Search word is e.g. bohnen_(weiss) . => "search("ingredientNames", ["bohnen_(weiss)"])"
There is also an underscore between bohnen and (weiss) that cannot be displayed here.
But entries with "pfefferkoerner_(weiss)" are also found...
That doesn't make any sense to me. 🤔
Any Idea ?
thanks
Summary
The user is experiencing an issue with the Query.search method in their code. They are trying to search for a specific term, but parts of the term are also being found, which doesn't make sense to them. They mention that they have stopped using special characters and it worked fine. Another user suggests being creative with indexes for searching. The user provides a code snippet for creating a query array. The specific search term they are using is "bohnen_(weiss)", but entries with "pfefferkoerner_(weiss)" are also being found. The user is unsure why this is happening and asks for any ideas or solutions
_alnes_
Rank 2: Process
Oct 19, 2023, 09:25
Hm, okay. It seems that no special characters or spaces can be used with the ".search" method, otherwise it will separate and search for both?
Tessa
Oct 19, 2023, 17:38
@VincentGe can you take a look at this?
VincentGe
Oct 19, 2023, 17:41
I believe special characters are not searchable in MariaDB fulltext indexes