In Lucene, using a standard analyzer, I want to create searchable fields in space. I set Field.Index.NOT_ANALYZED and Field.Store.YES using StandardAnalyzer. When I look at my index in LUKE, the fields will be as I expected, the field and value, such as: location → 'New York'.
Here I found that I can use KeywordAnalyzer to find this value using the query: location: "New York".
But I want to add another term to the query. Let say a has a body field that contains the normalized and parsed terms created by StandardAnalyzer. Using KeywordAnalyzer for this field, I get different results than when I use StandardAnalyzer.
How to combine two analyzers in one QueryParser, where one analyzer works for some fields and the other for other fields. Although I create my own analyzer, which can behave differently depending on the field, but I do not know how to do it.
Jakub source
share