: Think of the "name" field as less-important metadata field and "manu" as 
: the more important and longer content field.  When a person enters foo 
: bar baz, I want to avoid matches in the manu/content field caused by 
: matches of individual terms (that is why I removed manu field from the 
: "qf" DisMax param) -- I want a match in the manu/content field only if 
: the exact phrase appears there (that is why I am using "pf" and "ps" of 
: zero).

: My goal is not to increase the relevance of docs with exact phrase 
: matches, my goal is to completely avoid matches on individual terms in 
: the manu field.

definitely not something DisMax can deal with natively ... "pf" was 
designed to only improve the scores of existing matches if they match the 
entire input as a phrase.

what you describe is interesting ... but would require fundementally 
changing the DisMaxParser ... currently you configure it with a list of 
fields, and for each "token" in the input, it constructs a DisMaxQuery 
query for that token across all fields ... what you are describing doesn't 
fit that structure.

no ... wait a minute.  there is an easier way to go about this ... you 
said you hacked the DisMax Handler, but then you added the "pf" as 
required to the outermost query ... instead of doing that, add it as 
optional to the "parsedUserQuery" ... there will be some trickiness to 
this in the case that parsedUserQuery isn't a BooleanQuery; and in 
deciding how to set minShouldMatch (if the whole phrase is in the "manu" 
field, that's probably good enough even if no other "qf" field matches)
but those should be solvable.

let us know how this works out ... it might be a good general addition 
to DisMax .... a way to specify that certian fields should be included in 
the "qf" part of the query but only as phrases queries across all of the 
input words.



-Hoss

Reply via email to