Issue with Embedding Error in Version 0.25.0.rc63
TLDR Bill reported a bug in version 0.25.0.rc63 regarding a problem with updating or emplacing a document and receiving an embedding error. This was resolved in version 0.25.0.rc65, but further discussion ensued regarding the function of 'index' in the update feature.
3
1
1
Aug 10, 2023 (1 month ago)
Bill
12:45 PMPOST ../documents?action=emplace -> "message": "No valid fields found to create embedding for
embedding, 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
12:47 PMBill
12:47 PMKishore Nallan
12:48 PMBill
12:48 PMKishore Nallan
12:48 PMBill
12:48 PMKishore Nallan
12:49 PMBill
12:50 PMBill
12:55 PMCreate the collection
curl "<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
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
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
12:59 PMBill
01:00 PMKishore Nallan
01:32 PMproduct_name
Bill
01:33 PMKishore Nallan
01:34 PMKishore Nallan
01:35 PMaction=update
But it works with action=update for me.
Kishore Nallan
01:35 PMKishore Nallan
01: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
01:35 PMBill
01:36 PMNo valid fields found to create embedding for `embedding`, please provide at least one valid field or make the embedding field optional.
Bill
01:37 PMKishore Nallan
01:37 PMBill
01:38 PMBill
01:39 PMKishore Nallan
01:40 PMBill
01:41 PM{
"message": "No valid fields found to create embedding for
embedding
, please provide at least one valid field or make the embedding field optional."}
Bill
01:42 PMKishore Nallan
02: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
02:09 PMKishore Nallan
02:09 PMKishore Nallan
02:09 PMKishore Nallan
02:11 PMBill
02:11 PMBill
02:14 PM{
"message": "No valid fields found to create embedding for
embedding
, please provide at least one valid field or make the embedding field optional."}
Bill
02:15 PMBill
02:16 PM{
"name": "products",
"fields": [
{
"name": "product_name",
"type": "string"
},
{
"name": "about",
"type": "string"
},
{
"name": "embedding",
"type": "float[]",
"embed": {
"from": [
"product_name"
],
"model_config": {
"model_name": "ts/paraphrase-multilingual-mpnet-base-v2"
}
}
}
]
}
Bill
02:16 PMKishore Nallan
02:16 PMBill
02:16 PMKishore Nallan
02:16 PMBill
02:16 PMBill
02:16 PMBill
02:16 PMBill
02:18 PMBill
02:18 PMBill
02:18 PMKishore Nallan
02:18 PMKishore Nallan
02:18 PMBill
02:18 PMJason
04:37 PMBill
04:44 PM1
Bill
07:23 PM1
1
Bill
07:32 PM<http://localhost:8108/collections/docs/documents?filter_by=$FILTER_CLAUSE>
I used this curl but I get num_updated:0
Jason
07:38 PMBill
09:33 PM1
Aug 11, 2023 (1 month ago)
Bill
10:59 AMFor example, if the field has this structure:
{
"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: 1
Kishore Nallan
11:00 AMindex: false
mean no indices will be available to do any operation. This includes searching, filtering or sorting.Kishore Nallan
11:01 AMindex: false
field is as good as a stored field that's not part of schema.Kishore Nallan
11:01 AMindex: false
is useful to indicate which should be excluded.Bill
11:03 AMBill
11:03 AM1
Typesense
Indexed 2786 threads (79% resolved)
Similar Threads
Issues with Semantic Search in OpenAI Embeddings
Semyon was having issues while creating a schema for semantic search with OpenAI embeddings. Jason gave multiple suggestions for troubleshooting but none of them worked. The error was narrowed down to possibly being related to Semyon's specific OpenAI account or the OpenAI API key. The thread ended with Jason suggesting Semyon to check billing and make a direct API call to OpenAI.
Resolving Issues While Upgrading Typesense Server
Ayush had queries about upgrading their Typesense server and updating collections using auto-embeddings. Kishore Nallan clarified all issues, but later discovered that reindexing of non auto-embedded vector fields only is currently supported during altering.
Discussing Firestore Extension and Collection Schema in Typesense
Loic asks about settings in Firestore Extension and experiences issues with the collection schema in Typesense. Discussion with Jason is ongoing.
Trouble with Document Error in Indexing
Hauke is encountering an error during indexing with a specific field and working to provide Kishore Nallan with a reproducible example. Kishore Nallan gave troubleshooting advice, but issue not yet resolved.
Issue with Enabling Nested Fields in Existing Collection
Manish had issues querying a nested field 'bits' after changing the schema and re-indexing. Kishore Nallan clarified that enabling nested fields on an existing collection is not allowed. They suggested reproducing the issue with curl commands for a quicker solution.