Issue with `included_fields` Command in Typesense
TLDR SamHendley encountered an issue with the included_fields
command in Typesense versions 0.23.0 and 0.24.0.rc17. Jason helped identify it as a bug in the 0.24.X version, which was later addressed in release 0.24.0.rcn19.
Oct 14, 2022 (14 months ago)
SamHendley
06:42 PMincluded_fields
during a search? Right now I get an error saying my field is not in the schema (though I can see it is in document if I query by id). I went down a rabbit hole and got it mostly working using the new nested functionality in bleeding edge but I don’t ever need it to search it and would like it be left alone as much as possible.Jason
06:43 PMinclude_fields
(you had a typo btw)Jason
06:44 PMSamHendley
06:44 PMSamHendley
06:45 PMCould not find a field named "source" in the schema.
Jason
06:45 PMSamHendley
06:46 PMSamHendley
06:50 PMcurl "" \
-X POST \
-H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '{
"name": "companies",
"fields": [
{"name": "company_name", "type": "string" },
{"name": "num_employees", "type": "int32" },
{"name": "country", "type": "string", "facet": true }
],
"default_sorting_field": "num_employees"
}'
curl "" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-H "Content-Type: text/plain" \
-X POST \
-d '{"id": "124","company_name": "Stark Industries","num_employees": 5215,"country": "USA", "source" : {"data" :"value"}}
{"id": "125","company_name": "Acme Corp","num_employees": 2133,"country": "CA", "source" : {"data": "value2"}}'
curl "" \
-X POST \
-H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '{
"searches": [
{
"collection": "companies",
"q": "stark"
}
]
}'
curl "" \
-X POST \
-H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '{
"searches": [
{
"collection": "companies",
"q": "stark"
}
]
}'
SamHendley
06:53 PMJason
06:56 PM➜ ~ curl "" \
-X POST \
-H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '{
"searches": [
{
"collection": "companies",
"q": "stark"
}
]
}' | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 546 0 403 100 143 42524 15089 --:--:-- --:--:-- --:--:-- 78000
{
"results": [
{
"facet_counts": [],
"found": 1,
"hits": [
{
"document": {
"company_name": "Stark Industries",
"source": {
"data": "value"
}
},
"highlights": [
{
"field": "company_name",
"matched_tokens": [
"Stark"
],
"snippet": "<mark>Stark</mark> Industries"
}
],
"text_match": 72341265420648450
}
],
"out_of": 2,
"page": 1,
"request_params": {
"collection_name": "companies",
"per_page": 10,
"q": "stark"
},
"search_cutoff": false,
"search_time_ms": 0
}
]
}
Jason
06:56 PMSamHendley
07:00 PMJason
07:02 PMSamHendley
07:03 PMJason
07:03 PMOct 17, 2022 (14 months ago)
Jason
08:19 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Typesense Bug Fix with `canceled_at` Field and Upgrade Concerns
Mateo reported an issue regarding the treatment of an optional field by Typesense which was confirmed a bug by Jason. After trying an upgrade, an error arose. Jason explained the bug was due to a recent change and proceeded to downgrade their version. Future upgrade protocols were discussed.
Trouble in Implementing Deeply Nested Search
Anirudh is struggling to implement a two-level nested search. Jason asked for some specific examples to study the issue. Anirudh provided some material, realizing that adding top fields helped but might over-index. Jason then suggested reporting this issue on GitHub.
Inconsistent Search Results with Typesense
David reported inconsistencies with infix searching using Typesense, despite no change in configuration. Upon review, Jason could not consistently reproduce the issue and suggested potential fixes including a debug build on the user's cluster. The issue remains unresolved.
Issue with Embedding Error in Version 0.25.0.rc63
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.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.