Troubleshooting Search Results for Health Products
TLDR Tom is having issues with search results when adding extra words in the query. Jason suggests using max_candidates
and exhaustive_search
, but needs more time to find a proper solution.

Jun 02, 2023 (3 months ago)
Tom
04:34 PMWe are searching across about 60k health products on the product name.
When we search for 'Prosys sleeve small' we get the first result as 'Prosys leg bag sleeve small' which is perfect.
However, if we put any word in between 'Prosys' and 'sleeve small' it seems to just return any result with 'prosys' in the name with equal weighting.
For example, if we search 'Prosys bob sleeve small' the first result is 'Prosys Flofit self adhesive sheath standard' which doesn't have 'sleeve' or 'small' in the result
We've tried looking through and turning on/off lots of different search parameters, but we can't get 'Prosys bob sleeve small' to return the result containing 'sleeve' and 'small' 😞
Any suggestions very welcome!
Jason
04:38 PMmax_candidates: 100000
and see if that helps?Jason
04:38 PMexhaustive_search: true
Jason
04:38 PMTom
04:45 PMTom
04:46 PM{
"facet_counts": [],
"found": 6763,
"hits": [
{
"document": {
"amp_drug_tariff_id": "20072911000001103",
"category": "Silk vest small adult",
"colour": "White",
"drug_tariff_id": "20073011000001106",
"flavour": "",
"id": "20073011000001106",
"inactive": false,
"name": "Skinnies Silk vest short sleeve small adult White (Dermacea Ltd) 1 device",
"product_name": "Skinnies Silk vest short sleeve small adult",
"quantity": "1",
"size_weight": "",
"sub_pack_information": "",
"supplier": "Dermacea Ltd",
"tariffs": "Part IXa",
"unit_of_measure": "device"
},
"highlights": [
{
"field": "product_name",
"matched_tokens": [
"sleeve",
"small"
],
"snippet": "Skinnies Silk vest short <mark>sleeve</mark> <mark>small</mark> adult"
}
],
"text_match": 144681433930137601
},
{
"document": {
"amp_drug_tariff_id": "15037711000001107",
"category": "Elasticated viscose stockinette vest small adult",
"colour": "Beige",
"drug_tariff_id": "15039111000001100",
"flavour": "",
"id": "15039111000001100",
"inactive": false,
"name": "Skinnies Viscose stockinette vest long sleeve small adult Beige (Dermacea Ltd) 1 device",
"product_name": "Skinnies Viscose stockinette vest long sleeve small adult",
"quantity": "1",
"size_weight": "",
"sub_pack_information": "",
"supplier": "Dermacea Ltd",
"tariffs": "Part IXa",
"unit_of_measure": "device"
},
"highlights": [
{
"field": "product_name",
"matched_tokens": [
"sleeve",
"small"
],
"snippet": "Skinnies Viscose stockinette vest long <mark>sleeve</mark> <mark>small</mark> adult"
}
],
"text_match": 144681433930137601
},
{
"document": {
"amp_drug_tariff_id": "23589211000001108",
"category": "Tubing and accessories",
"colour": "",
"drug_tariff_id": "23589311000001100",
"flavour": "",
"id": "23589311000001100",
"inactive": false,
"name": "Prosys leg bag sleeve small PLS3881 24cm-40cm (CliniSupplies Ltd) 4 device",
"product_name": "Prosys leg bag sleeve small",
"quantity": "4",
"size_weight": "24cm-40cm",
"sub_pack_information": "",
"supplier": "CliniSupplies Ltd",
"tariffs": "Part IXb",
"unit_of_measure": "device"
},
"highlights": [
{
"field": "product_name",
"matched_tokens": [
"Prosys",
"sleeve",
"small"
],
"snippet": "<mark>Prosys</mark> leg bag <mark>sleeve</mark> <mark>small</mark>"
}
],
"text_match": 144681433930137601
}
],
"out_of": 165394,
"page": 1,
"request_params": {
"collection_name": "drug_tariff",
"per_page": 3,
"q": "prosys geoff sleeve small"
},
"search_cutoff": false,
"search_time_ms": 15
}
Tom
04:47 PMTom
04:52 PMJason
04:55 PMdrop_tokens_threshold
).Jason
04:57 PMJason
04:59 PMJason
04:59 PM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.


Resolving Typesense Search Issues
Conversation started by Maximilian about Typesense search behavior led to Users Kishore Nallan and Mike discussing and suggesting workaround, with Kishore Nallan promising an official solution soon. No final confirmation of resolution provided.

Troubleshooting Typesense Query for Product Search
Killian experienced unexpected search results from a typesense query for specific product sets. Kishore Nallan suggested adjusting drop_tokens_threshold and testing a newer software version.

Issue with Typo Correction/Prefix Search and the Role of max_candidates
John noticed inconsistent search results based on max_candidates settings, and Kishore Nallan clarified its role for multi-word queries. They resolved that increasing max_candidates ensures the query isn't prematurely limited.


Issues With `text_match` Scoring for Search Queries in Typesense
Colin encountered issues with the `text_match` scoring on Typesense v0.23.1. Jason and Kishore Nallan identified a potential issue with numeric overflow in the text match score and applied an unverified patch. The final resolution is unclear.


