lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Gazzarini <>
Subject Re: Weird behavioural differences between pf in dismax and edismax
Date Mon, 28 May 2018 07:01:34 GMT
Hi Sam,
I noticed the same behaviour. Looking at the code it seems that it is 
expected: the two classes (ExtendedDisMaxQParser and DisMaxQParser) 
don't have a direct inheritance relationships and the methods which deal 
with the PF parameter are different. Specifically, the 
DismaxQParser.getPhraseQuery seems to produce the query phrase 
regardless the number of terms that compose the query (and this matches 
with the observed behaviour), while the ExtendedDismax seems to take in 
account this aspect .

I agree with you, it results in a different behaviour, even for those 
single-word queries that output more than one terms (e.g. putting a pf 
clause with a q=hello-world and a field in qf which uses a 
StandardTokenizer or a WordDelimiterFilter in the analyzer).

About the reason of such different implementation, I don't know, maybe 
someone else here is able to help you.


On 27/05/18 15:14, Sambhav Kothari wrote:
> Hello,
> I experienced a weird behaviour with dismax and edismax query parsers.
> Dismax will include pf boosts when we query something that has just a
> single word, edismax on the other hand will not include pf boosts.
> The result is that a dismax and an edismax handler with the same set of
> defaults, return different results for single word queries (eg. "Hello")
> but the same results for multi word queries (eg. "Hello Wold")
> Is this expected?
> Regards,
> Sam

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message