<@U01PL2YSG8L> Insearch is providing irrelevant da...
# community-help
a
@Kishore Nallan Insearch is providing irrelevant data. For example, when we search for the keyword 'mirage,' after the first 11 results, it starts giving irrelevant data https://www.mypustak.com/search?value=mirage&sortBy=books_collection%2Fsort%2Fnum_is_out_of_stack%3Aasc%2CiDate%3Adesc&query=mirage
k
What is insearch?
a
in searching query
@Kishore Nallan
k
Post the full typesense query sent and the actual JSON response received from the server.
a
@ok
@Kishore Nallan
Copy code
{
  "searches": [
    {
      "q": "mirage",
      "query_by": "isbn,title,author,,embedding,publication",
      "prioritize_token_position": true,
      "max_facet_values": 10,
      "num_typos": "2",
      "min_len_1typo": 2,
      "split_join_tokens": "always",
      "typo_tokens_threshold": 10,
      "per_page": 50,
      "sort_by": "num_is_out_of_stack:asc",
      "pre_segmented_query": true,
      "drop_tokens_threshold": 0,
      "highlight_full_fields": "isbn,title,author,,embedding,publication",
      "collection": "books_collection",
      "facet_by": "agedGroup,author,binding,bookCondition,language,price,publication",
      "page": 1
    }
  ]
}
@Kishore Nallan response is too long to paste
k
If you are querying by
embedding
you should set a distance threshold so that lower similarity items are not fetched: https://typesense.org/docs/26.0/api/vector-search.html#distance-threshold
a
Copy code
"vector_query": "embedding:([0.96826,0.94,0.39557,0.306488], k:100)"
is it distance threshold
k
No, search for
distance_threshold
on that page
a
@Kishore Nallan
Copy code
"vector_query": "embedding:([], distance_threshold:0.30)"