You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
I was expecting to get 1 hit for the word Hi.
Current behavior
But I get 0 hits for Hi. I get 1 hit if we search Hello instead and also if book is created using this description: <div>Hello</div><div> Hi</div> (i.e. one space before Hi)
Environment (please complete the following information):
OS: Mac
Meilisearch server version: 1.4.2
meilisearch-rails version: 0.10.1
Rails version: 7.1.1
The text was updated successfully, but these errors were encountered:
The sanitize_attributes option will completely remove any html tags from attributes before sending it to meilisearch. So while when you search for the book you will see [#<Book id: 1, description: "<div>Hello</div><div>Hi</div>"..., in the meilisearch server it will be saved as {"description": "HelloHi"....
Therefore you are searching for Hi in HelloHi which does not return any results because meilisearch is a prefix based search engine, and does not return results that match within a word.
Here's an issue in the meilisearch server repo where someone else ran across this: meilisearch/meilisearch#3863.
Let me know if that explanation makes sense, I will leave the issue open just in case.
Description
When I use sanitize attributes, search does not return expected results. For eg. I have:
This is only for book with description which has some HTML in this format:
Now, when I search like this:
Expected behavior
I was expecting to get 1 hit for the word
Hi
.Current behavior
But I get 0 hits for
Hi
. I get 1 hit if we searchHello
instead and also if book is created using this description:<div>Hello</div><div> Hi</div>
(i.e. one space beforeHi
)Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: