Bill
08/10/2023, 12:45 PMembedding
, please provide at least one valid field or make the embedding field optional." with payload:`
{
"id": "602",
"about": "test"
}
this also happens with action=update
Kishore Nallan
08/10/2023, 12:47 PMBill
08/10/2023, 12:47 PMKishore Nallan
08/10/2023, 12:48 PMBill
08/10/2023, 12:48 PMKishore Nallan
08/10/2023, 12:48 PMBill
08/10/2023, 12:48 PMKishore Nallan
08/10/2023, 12:49 PMBill
08/10/2023, 12:50 PMBill
08/10/2023, 12:55 PMcurl "<http://localhost:8108/collections>" \
-X POST \
-H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '
{
"name": "products",
"fields": [
{
"name": "product_name",
"type": "string"
},
{
"name": "about",
"type": "string"
},
{
"name": "embedding",
"type": "float[]",
"embed": {
"from": [
"product_name",
"about"
],
"model_config": {
"model_name": "ts/paraphrase-multilingual-mpnet-base-v2"
}
}
}
]
}
'
Bill
08/10/2023, 12:56 PMcurl "<http://localhost:8108/collections/products/documents/import?action=create>" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-H "Content-Type: text/plain" \
-X POST \
-d '
{"product_name": "ABCD","about": "This is some description text"}
'
Bill
08/10/2023, 12:58 PMcurl "<http://localhost:8108/collections/products/documents?action=emplace>" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-H "Content-Type: text/plain" \
-X POST \
-d '
{"id": "1","about": "Test"}
'
Kishore Nallan
08/10/2023, 12:59 PMBill
08/10/2023, 1:00 PMKishore Nallan
08/10/2023, 1:32 PMproduct_name
Bill
08/10/2023, 1:33 PMKishore Nallan
08/10/2023, 1:34 PMKishore Nallan
08/10/2023, 1:35 PMthis also happens withBut it works with action=update for me.action=update
Kishore Nallan
08/10/2023, 1:35 PMKishore Nallan
08/10/2023, 1:35 PMNo valid fields found to create embedding for `embedding`, please provide at least one valid field or make the embedding field optional.
Kishore Nallan
08/10/2023, 1:35 PMBill
08/10/2023, 1:36 PMNo valid fields found to create embedding for `embedding`, please provide at least one valid field or make the embedding field optional.
Bill
08/10/2023, 1:37 PMKishore Nallan
08/10/2023, 1:37 PMBill
08/10/2023, 1:38 PMBill
08/10/2023, 1:39 PMKishore Nallan
08/10/2023, 1:40 PMBill
08/10/2023, 1:41 PMembedding
, please provide at least one valid field or make the embedding field optional."
}Bill
08/10/2023, 1:42 PMKishore Nallan
08/10/2023, 2:07 PM"id": "1",
is sent as the record ID. But the first record that gets indexed via action=create
will actually get id: 0Bill
08/10/2023, 2:09 PMKishore Nallan
08/10/2023, 2:09 PMKishore Nallan
08/10/2023, 2:09 PMKishore Nallan
08/10/2023, 2:11 PMBill
08/10/2023, 2:11 PMBill
08/10/2023, 2:14 PMembedding
, please provide at least one valid field or make the embedding field optional."
}Bill
08/10/2023, 2:15 PMBill
08/10/2023, 2:16 PMBill
08/10/2023, 2:16 PMKishore Nallan
08/10/2023, 2:16 PMBill
08/10/2023, 2:16 PMBill
08/10/2023, 2:16 PMKishore Nallan
08/10/2023, 2:16 PMBill
08/10/2023, 2:16 PMBill
08/10/2023, 2:16 PMBill
08/10/2023, 2:18 PMBill
08/10/2023, 2:18 PMKishore Nallan
08/10/2023, 2:18 PMBill
08/10/2023, 2:18 PMKishore Nallan
08/10/2023, 2:18 PMBill
08/10/2023, 2:18 PMJason Bosco
08/10/2023, 4:37 PMBill
08/10/2023, 4:44 PMBill
08/10/2023, 7:23 PMBill
08/10/2023, 7:32 PM<http://localhost:8108/collections/docs/documents?filter_by=$FILTER_CLAUSE>
I used this curl but I get num_updated:0Jason Bosco
08/10/2023, 7:38 PMBill
08/10/2023, 9:33 PMBill
08/11/2023, 10:59 AM{
"facet": *false*,
"index": *false*,
"infix": *false*,
"locale": "",
"name": "productID",
"optional": *true*,
"sort": *false*,
"type": "string"
},
The response using this curl:
curl "<http://localhost:8108/collections/docs/documents?filter_by=productID:=Test>" -X PATCH \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{"title": "Title with 1000 points."}'
is ->
{
"num_updated": 0
}
If the field that I use in filter_by is set to index: true -> num_updated: 1Kishore Nallan
08/11/2023, 11:00 AMindex: false
mean no indices will be available to do any operation. This includes searching, filtering or sorting.Kishore Nallan
08/11/2023, 11:01 AMindex: false
field is as good as a stored field that's not part of schema.Kishore Nallan
08/11/2023, 11:01 AMindex: false
is useful to indicate which should be excluded.Bill
08/11/2023, 11:03 AMBill
08/11/2023, 11:03 AM