Issues with Prefix Search and Sorting Results in Typesense
TLDR Pankaj asked about prefix search issues and sorting results in Typesense. Kishore Nallan explained prefix search limitations and suggested using text_match for sorting. Filtering with prefix searching isn't supported.
1
1
May 06, 2023 (7 months ago)
Pankaj
08:38 AM1. Given the data like this
{
"invoice_number": "inv123456",
"company_name": "company name",
}
for query
inv
, I get expected result<mark>inv</mark>123456
but for the query
inv company
, I get a match only for the company name, expected is to match both fieldsam I missing something here?
2. We are doing multi search on 4 collections, whats the best to sort results for a combined array ? is
text_match
is enough for this?Thank you 🙂
May 08, 2023 (7 months ago)
Pankaj
05:48 AMKishore Nallan
05:49 AMinv
is the first word in the query inv company
it won't match inv123456
Kishore Nallan
05:49 AMPankaj
06:11 AMinv
is the first word in the query inv company
it won't match inv123456
Kishore Nallan is there a way/option to change this behaviour and make it match both fields ?
Kishore Nallan
06:12 AM1
Jainil
02:10 PMfilter_by=invoice_number:inv
instead of putting inv
in the search query?Kishore Nallan
02:11 PM1
Jason
06:00 PMTypesense
Indexed 3011 threads (79% resolved)
Similar Threads
Querying TypeSense with Different Search String Orders
Jesper needed explanation on the difference in TypeSense search results for "X Y" and "Y X". Kishore Nallan clarified that Typesense treats the last word as a prefix query, explaining the discrepancy.
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.
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 Query Issues
Todd had queries regarding Typesense operation. Jason clarified Typesense's default behavior and provided a recommendation to enhance results ranking based on relevance and recency.
Handling Singular vs Plural in Search Queries
Rajeev queried about handling singular and plural in search queries. Kishore Nallan explained that there's no definite way for handling plurals in Typesense. They agreed to troubleshoot Rajeev's query issues further.