In Lucene, using a standard analyzer, I want to create fields with spaces and special characters to search

In Lucene, using a standard analyzer, I want to create fields with spaces and special characters (underscore,!, @, #, ....) for the search.

I set IndexField to NOT_ANALYZED_NO_NORMS and Field.Store.YES

When I look at my index in LUKE, the fields will be as I expected, with values ​​such as:

'SKU Number', but when I search for "SKU" or "SKU *" nothing appears.

What am I missing?

0
source share
2 answers

"SKU" , NOT_ANALYZED; "SKU Number" - . , , ANALYZED.

"SKU *" , lucene QueryParser . lowercaseExpandedTerms False.

+1

. Store.YES . IndexField NOT_ANALYZED.

Luke "SKU Number" KeywordAnalyzer.

0

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


All Articles