Skip to content

Add and retrieve metadata section of Collection Model definition (on creation or fetch) #82

Open
@danipenaperez

Description

Description

On collection create action, via API you be able to send metadata, but typesense-java-sdk does not support this field.

Steps to reproduce

Offical Docs at https://typesense.org/docs/27.1/api/collections.html#adding-metadata-to-schema.

Expected Behavior

That CollectionSchema.java has new field "metadata" with signature similar to:

collectionschema.setMetaData(Map<String,Object> metadata);

The user be able to use in this way:

var metadata = new HashMap<String,Object>();
metadata.put("batch_job", 325);
metadata.put("indexed_from", "2023-04-20T00:00:00.000Z")
collectionSchema.setMetadata(metadata;

client.collections().create(collectionSchema); //Will create collection adding metadata

Actual Behavior

It's not supported.

Metadata

Typesense Version JAVA: v1.0.0

OS:

Would be great to fetch metadata info using client.collections("products").retrieve().getMetadata();

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions