Hi, I'm looking for a way to implement multi term synonym query expansion i.e., I would like to expend phrase query like "big dog" to return documents containing "big hush puppies". This implementation should support queries with lucene query parser syntax i.e., queries like "+big -dog" to return documents containing big but not "hush puppies".
I've read an example in "Lucene in Action" for synonym analyzer but it will work only for single term synonym and not multi term. I thought on replacing the user original string query before forwarding it to the query parser but I do not like this solution as it involves messing around with complicated string parsing. Can you suggest an implementation for multi term synonym query expansion that support query parser syntax? Thanks, Guy Moshkowich