Re: how to normalize a query

2010-09-09 Thread Lance Norskog
In the general case, this would require a new method on compound queries to sort themselves into a "canonical" order, or refuse to. Somehow, I don't think this will happen. However, it could be done with boolean queries only, which would make it somewhat easier to combinatorically compose OR fi

Re: how to normalize a query

2010-09-09 Thread Jonathan Rochkind
Those two queries might NOT always be 'the same', depending on how you have your Solr request handler set up. For instance, if you have dismax with a ps boost, then "two one" may end up with different relevancy scores than "one two", because the query as a phrase will be used for boosting, and

Re: how to normalize a query

2010-09-09 Thread dan sutton
What I wanted was a was to determine that simply the query q="one two" is equivalent to q="two one", by normalizing I might have q="one two" for both for example, and then the q.hashCode() would be the same Simply using q.hashCode() returns different values for each query above so this is not su

Re: how to normalize a query

2010-09-09 Thread Markus Jelsma
LuceneQParser http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Proximity%20Searches DismaxQParser http://wiki.apache.org/solr/DisMaxQParserPlugin#qs_.28Query_Phrase_Slop.29 On Thursday 09 September 2010 15:08:41 dan sutton wrote: > Hi, > > Does anyone know how I might normalized a que

how to normalize a query

2010-09-09 Thread dan sutton
Hi, Does anyone know how I might normalized a query so that e.g. q="one two" equals q="two one" Cheers, Dan