Here's an example query with q.op=AND:

   causes of heart attack

And I have this synonym definition:

   heart attack, myocardial infarction

So, what is the alleged query parser fix so that the query is treated as:

   causes of ("heart attack" OR "myocardial infarction")

The core problem with the synonym filter is that it mashes all the terms of a multi-term synonym to be at the same position so that the order ("attack" after "heart" and "infarction" after "mycardial") is lost.

What is needed is a synonym filter with a notion of "path" so the term sequences for each of the synonym alternatives is available for the query parser to generate the OR alternative queries.

Granted, the query parser ALSO needs to present the full sequence of terms to the analyzer as one string "causes of heart attack", but that alone doesn't address the synonym filter misbehavior.

-- Jack Krupansky

-----Original Message----- From: Robert Muir
Sent: Friday, January 25, 2013 3:46 AM
To: dev@lucene.apache.org
Subject: Re: Fixing query-time multi-word synonym issue

On Fri, Jan 25, 2013 at 12:48 AM, Jack Krupansky
<j...@basetechnology.com> wrote:
Otis, this is precisely why nothing will get done any time soon on the
multi-term synonym issue - there isn't even common agreement that there is a
problem, let alone common agreement on the specifics of the problem, let
alone common agreement on a solution.

I think you are the only one arguing the bug is a synonymsfilter problem.


Even though technically the Solr Query Parser is now separate from the
Lucene Query Parser, the synonym filter is still strictly Lucene. Addressing
the multi-term synonym feature requires enhancement to the synonym filter,

dude you have a bug in X, you fix the bug in X: you dont go hack around it in Y.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to