I used a search tool using Lucene.Net. The index includes UK academic qualifications, including A Level.
I would like users to be able to search using the phrase "A Level", but using the standard analyzer, "A" is deleted as a stop word, and therefore only the "Level" is indexed / search is performed.
What is my best way around this? I assume that I need to somehow designate "A Level" to "A-Level" or similar, creating my own analyzer.
Is this a better approach?
Changes:
Notice that I want the entire search to not be a phrase query. that is, in my search box, I want the user to be able to enter <"A Level" and English mathematics physics>, and this will return any of "A Level" and any of English mathematics or physics. The question has been updated to reflect this.
I would like the word "A" to be used in all cases as the stop word from "A Level"
The phrase "A Level" is not in its own specific field, it is in a free text field, which may include a phrase.
source
share