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 (4 months 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 (4 months 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 3015 threads (79% resolved)
Similar Threads
Understanding the Difference Between Query by and Filter by
satish asked the difference between Query by and filter by. Kishore Nallan explained that Query by supports fuzzy searching while filter by is a precise match restriction.
Overrides/Curation Query and Filtering Docs
Jameshwart sought for filtering assistance, and Kishore Nallan suggested checking the overrides/curation section in the docs.
Querying Multiple Embedding Columns in Typesense Semantic Search
gaurav asked about using multiple embedding columns in Typesense's semantic search. Kishore Nallan clarified that only one embedding column can be queried at a time.
Typesense Support for Embedding Documents
Jacob asked if Typesense supports embedding documents for their specific use case. Kishore Nallan confirmed that this feature is high on their priority list.
Full Text Search Across Long Books: Chunking vs. Single Document
Epi asked about providing FTS for long books. Kishore Nallan suggested breaking the books into chunks for better performance and query results.