Currently, my Lucene search code allows the user to specify
which fields are searched ...I have now had a request to enhance
the code to allow the users to specify that certain
searchfields contain one value and other ( or all other ) fields
contain a different value.
In Luke I can do following to run this type of search:
+secondarySection:"Vendor Information" +title:types
The relevant section of my code as it currently stands is
as follows: ...
.
.
.
// Is a Lucene FSDir object available
if (fsDir != null) {
is = new IndexSearcher(fsDir);
// searchFields are those Lucene fields which I need to search for
the search term
qp = new MultiFieldQueryParser(searchFields,new StopAnalyzer());
if (qp != null) {
// stringToFind is search term I am searching for across all
fields
query = qp.parse(stringToFind.toUpperCase());
} // if ( fsDir != null )
}
Can anyone suggest how I need to proceed to mod this code to allow for
the new feature requested ...
Thanks