Issues with Recommendation Query Tag Sorting and Matching
TLDR Adrian has an issue with a recommendation query not returning sorted results. Jason suggested turning the array into a string. Adrian tried this without success and suggests it may be a bug.
1
Jan 31, 2023 (8 months ago)
Adrian
08:08 PMq='tradition_daoism tradition_buddhism topic_freedom topic_bliss style_body style_meditation'&query_by=tags&prefix=false
returns documents with a single matching tag in the array, and then in the 15th spot will return documents that match 2-3 tags, and it doesn’t return all documents with multiple matching tags. Also changing the query string order of the tags will affect what documents get returned and in which order. Have also tried using
filter_by=tags:[tradition_daoism, etc.…]
, but that doesn’t sort by number of matching tags either. Feels like I’m missing something obvious, but can’t seem to make any progress, any tips are appreciated.Feb 01, 2023 (8 months ago)
Jason
07:01 PM> I would expect the the results to be ordered with documents containing the most matching tags appearing first,
We don’t do this within a string array, only a regular string field.
Could you change this field into a string and separate entries by space and try with the
q
parameter?Adrian
07:19 PMSeems like it might a useful feature for string arrays, any plans for something that might achieve a similar functionality?
Jason
07:46 PM1
Feb 05, 2023 (8 months ago)
Adrian
03:25 PM/collections/articles/documents/search?q=tradition_buddhism tradition_daoism style_body style_meditation topic_bliss topic_freedom&query_by=tagsString&include_fields=tagsString,id&highlight_fields=none&highlight_full_fields=none&prefix=false&per_page=100
Gives this output, as an example note how the penultimate result has 3 matching tokens, yet has the same textmatch scores. (ps. this is on Typesense cloud v0.24)
Typesense
Indexed 2779 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.
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.
Docsearch Scrapper Metadata Configuration and Filter Problem
Marcos faced issues with Docsearch scrapper not adding metadata attributes and filtering out documents without content. Jason helped fix the issue by updating the scraper and providing filtering instructions.