Hi guys,


I’m just following up from an earlier question I raised on the forum regarding 
inconsistencies in edismax query behaviour and I think I may have discovered 
the cause of the problem.  From testing I've noticed that edismax query 
behaviour seems to change depending on the field types specified in the qf 
parameter.



Here’s an example first using only solr.Text fields.



(all fields are “text_general” – standard tokenizer, lower case filter only)

NAME solr.TextField

ADDRESS solr.TextField

EMAIL solr.TextField

PHONE_NUM solr.TextField



“qf":"NAME ADDRESS EMAIL PHONE_NUM”



"querystring":"peter john spain",

"parsedquery":"+(+DisjunctionMaxQuery((PHONE_NUM:peter | ADDRESS:peter | 
EMAIL:peter | NAME:peter)) +DisjunctionMaxQuery((PHONE_NUM:john | ADDRESS:john 
| EMAIL:john | NAME:john)) +DisjunctionMaxQuery((PHONE_NUM:spain | 
ADDRESS:spain | EMAIL:spain | NAME:spain)))",





Now with no other configuration changes when I introduce a range date field 
(solr.DateRangeField) called “DOB” into the qf parameter the behaviour of the 
edismax parser changes dramatically.



DOB solr.DateRangeField



“qf":"NAME ADDRESS EMAIL PHONE_NUM DOB”



"querystring":"peter john spain",

"parsedquery":"+(+DisjunctionMaxQuery(((+PHONE_NUM:peter +PHONE_NUM:john 
+PHONE_NUM:spain) | (+EMAIL:peter +EMAIL:john +EMAIL:spain) | () | (+NAME:peter 
+NAME:john +NAME:spain) | (+ADDRESS:peter +ADDRESS:john +ADDRESS:spain))))",




Notice the difference of the “|OR” and “+AND” between terms and also every term 
is now mandatory to exist in every field.  Is this the expected behaviour for 
the edismax query parser or am I overlooking something that may be causing this 
behaviour inconsistency?



As always any comments or feedback is greatly appreciated,


Thanks



Dwane



Reply via email to