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

Đang mở
#82 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

  • #118 của @Nikhiladiga — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
90
Fork
39
Merge trung bình
22 giờ 26 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của typesense/typesense-java

Tất cả issue của typesense/typesense-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.