For query query: '"bogdan"' i’m getting 5 users that matches the query very well.
For query query: 'bogdan' i’m getting more than 20 users, some of then don’t match the query well.
So my question, how double quotes affects the searching behavior?
Hi @Bohdan_Zagursky, it’s a good question. It really comes down to how your data looks. You might benefit from executing the query as a compound query where the autocomplete is one should clause and there is a phrase query as a should clause as well.
So as an example, let’s say the field is called tags, and I’ve got a document where tags is Horror, Film Noir, Dark. I’d like my users to be able to find this document by searching with "Film Noir" (with double quotes) but also by fuzzy-searching by something with typos, such as Fiml Nior.
But also I want them to find the document with a search like "Film Noir" Dakr (exact match + fuzzy on the same field).
So @Marcus (or anyone else), is there some way to index a field as both autocomplete and as a string? Or is there a better way to do this?
Right now it seems I have to choose one or the other for a given field, and in my case I want almost all of my collection’s fields to be searchable as exact matches AND fuzzily, depending on whether quoted phrases/words are included (like Google Search).