I dont quite understand, how would the indexing of...
# community-help
s
I dont quite understand, how would the indexing of multiple different chunks then work?
Copy code
(base) said@said-HP-Laptop-17-cp3xxx:~$ curl "<http://localhost:8108/collections>" -X POST \ost:8108/collections" -X POST \
  -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "nested_test_new2",
    "fields": [
      {"name": "id", "type": "string"},
      {"name": "title", "type": "string"},
      {"name": "Summary", "type": "string"},
      {"name": "Dense_Summary_Embedding", "type": "float[]", "num_dim": 5},
      {"name": "chunks.text", "type": "string"},
      {"name": "chunks.vector", "type": "float[]", "num_dim": 5}
    ],
    "enable_nested_fields": true
  }'
{"created_at":1737811871,"default_sorting_field":"","enable_nested_fields":true,"fields":[{"facet":false,"index":true,"infix":false,"locale":"","name":"title","optional":false,"sort":false,"stem":false,"store":true,"type":"string"},{"facet":false,"index":true,"infix":false,"locale":"","name":"Summary","optional":false,"sort":false,"stem":false,"store":true,"type":"string"},{"facet":false,"hnsw_params":{"M":16,"ef_construction":200},"index":true,"infix":false,"locale":"","name":"Dense_Summary_Embedding","num_dim":5,"optional":false,"sort":false,"stem":false,"store":true,"type":"float[]","vec_dist":"cosine"},{"facet":false,"index":true,"infix":false,"locale":"","name":"chunks.text","optional":false,"sort":false,"stem":false,"store":true,"type":"string"},{"facet":false,"hnsw_params":{"M":16,"ef_construction":200},"index":true,"infix":false,"locale":"","name":"chunks.vector","num_dim":5,"optional":false,"sort":false,"stem":false,"store":true,"type":"float[]","vec_dist":"cosine"}],"name":"nested_test_new2","num_documents":0,"symb(base) said@said-HP-Laptop-17-cp3xxx:~$ curl "<http://localhost:8108/collections/nested_test/documents>" -X POST \ctions/nested_test/documents" -X POST \
  -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "1",
    "title": "Test Document",
    "Summary": "This is an example summary of document 1",
    "Dense_Summary_Embedding": [0.1, 0.2, 0.3, 0.4, 0.5],
    "chunks.text": "First chunk", "chunks.vector": [0.1, 0.2, 0.3, 0.1, 0.2],
    "chunks.text": "Second chunk", "chunks.vector": [0.4, 0.5, 0.6, 0.4, 0.5]
  }'
{"message":"A document with id 1 already exists."}
Could you maybe send a working example?