I'm having a problem with a Typesense query. I ha...
# community-help
r
I'm having a problem with a Typesense query. I have 12 items with the word "delivery" in their title, description, and/or tags. Here's the query:
Copy code
return {
    query_by: [
    'title',
    'description',
    '_tags',
  ],
    q: query,
    max_candidates: 2500,
    per_page: 50,
  };
If I search for
query="delivery"
, I only get the two items with the word "delivery" in their title. If I search for "deliver" without the "y", all 12 items show up. If I search for "deliveryy" with two y's, then 11 items show up. If I change the query_by so that the field order is "description", "title", "_tags", then I only get the eight items with the word "delivery" in their description, and not the two with "delivery" in their title or the others with "delivery" in their _tags. Why is this happening?
j
Hi Richard. Difficult to say exactly why without seeing the results that are getting matched too, could be a few reasons. Would you be able to share them? Feel free to DM if they need to be kept private. One fix could be to try adding
exhaustive_search: true
as a query parameter, this should make the results more consistent.
r
Thanks for getting back to me, @Jonathan King, I eventually added
exhaustive_search: true
and that fixed it, but that seems like a hack. I'll DM you the cURL request.