I am using Lucene.net for the search feature of a web application. I want to search locations which constitute more than one word for an exact match(phrase based) and exclude the other match results(word based) and vice versa. what approach should I use? Is it possible to index phrases in Lucene.net?
0
votes
1 Answers
1
votes
yes, use PhraseQueries
if you use the QueryParser, phrases are specified with quotes, ie: "this is a phrase"
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_0/queryparsersyntax.html