Hi all,
I need to create a search for my Lucene index in Hibernate Search. Right now I have a three layer application (Web services, EJB and DAO). In DAO layer I have a method to search for several fields with MultiFieldQueryParser.
Now, I want to offer Phrase querys to insert q query string like "Batman and robin", searching for this title not tokenized. I am going to force the user to insert the query string with quotation marks. That way i will know that i have to use PhraseQuery and not MultiFieldQueryParser...
I will check in my search EJB if the query string has quotations (") and execute one or another searching.
Anybody has done something similar? is this the best way to do it?
Thanks in advance,
Hibernator.
|