Hi there !
I'm looking for a possibility to extract the words the user searches for from a complex Lucene query.
E.g.: The user types "+title:
test +author:daniel". or: "test daniel" or: "title:te* -frank +daniel" etc.
Since Lucene has a powerfull syntax and many features, there are many possibilities the query could look like.
Are there any options to handle this with Lucene classes?
I'll need this for a synonym search. I want to inject synonyms into the query. This meens I'm trying to replace for example the searchquery "test +title:(cat+dog)" with "(test^6 exam trial) +title: ((dog^6 hound) (cat^6 pussycat))" dynamicly. The problem is, the nested expression ( '(' and ')' ) and operators like oder "+" or "-" have to be on the right position after expanding the query.
I'm looking forward to avoid writing an own java-method for this problem...
thanking you in anticipation.