Adrian
01/31/2023, 8: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.Jason Bosco
02/01/2023, 7:01 PMI 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
02/01/2023, 7:19 PMJason Bosco
02/01/2023, 7:46 PMAdrian
02/05/2023, 3: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)