Search in sleep mode, can I find special characters?

Is it possible to find fullTextQuery exactly a word with special characters? A luke search works well with a query, but from fullTextQuery does not return results.

new BooleanClause(qBuilder.keyword().wildcard().
onField("field").matching("c++").createQuery(),BooleanClause.Occur.MUST)

No wildcards to search for "c" without special characters.

How to solve this problem?

+4
source share
1 answer

Using @Analyzer(impl = WhitespaceAnalyzer.class)over this field you can solve your problem.

+3
source

Source: https://habr.com/ru/post/1543954/


All Articles