Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danipenaperez opened this issue Jan 16, 2025 · 0 comments

Comments

@danipenaperez
Copy link

danipenaperez commented Jan 16, 2025

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();

@danipenaperez danipenaperez changed the title Add metadata section to Collection Model definition creation Add and retrieve metadata section of Collection Model definition (on creation or fetch) Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant