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

Abierto
#82 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #118 de @Nikhiladiga — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
java
Área
api

Línea de trabajo

Start with CollectionSchema.java, which needs a metadata field with getter and setter for a Map<String,Object>, then check the collection retrieve response model so getMetadata() can be read back. Look at how the collections create and retrieve calls serialize these models. Done means a collection can be created with metadata and the same metadata is returned on retrieve. Closed, unmerged PR #118 already attempted this, so read it first.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
90
Forks
39
Merge medio
22 h 26 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de typesense/typesense-java

Todos los issues de typesense/typesense-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.