Because of this, exact word matches don’t work like they would with the default analyzer. If the title of a document is
This works. However, I want to give exact word matches an extra boost in the search score. Hence I want to run an additional regex query that looks for either only whitespace before or after the word, or the word being at the beginning and/or end of the string.
For example, when I search for
Java, I want
Java beginner tutorial to rank higher than
The normal Regex operators don’t seem to work with the Atlas regex search. I tried things like word boundaries
\bJava\b or others, but none of them had an effect.