lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: edismax doesn't obey 'pf' parameter
Date Fri, 16 Dec 2011 17:03:01 GMT
That was a little confusing!

" there's always exactly one token at position 0."

Of course. What I meant to say was there is
always exactly one token in a non-tokenized
field and it's offset is always exactly 0. There
will never be tokens at position 1.

So asking to match phrases, which is based on
term positions is basically a no-op.

Hope that makes more sense

On Fri, Dec 16, 2011 at 11:44 AM, Erick Erickson
<> wrote:
> A side note: specifying qt and defType on the same query is probably
> not what you
> intend. I'd just omit the qt bit since you're essentially passing all
> the info you intend
> explicitly...
> I see the same behavior when I specify a non-tokenized field in 3.5
> But I don't think this is a bug since it doesn't make sense to specify a phrase
> field on a non-tokenized field since there's always exactly one token
> at position
> 0. The whole idea of phrases is that multiple tokens must appear within
> the slop.
> Best
> Erick
> On Thu, Dec 15, 2011 at 5:46 PM, entdeveloper
> <> wrote:
>> I'm observing strange results with both the correct and incorrect behavior
>> happening depending on which field I put in the 'pf' param. I wouldn't think
>> this should be analyzer specific, but is it?
>> If I try:
>> http://localhost:8080/solr/collection1/select?qt=%2Fsearch&q=mickey%20mouse&debugQuery=on&defType=edismax&pf=blah_exact&qf=blah
>> It looks correct:
>> <str name="rawquerystring">mickey mouse</str>
>> <str name="querystring">mickey mouse</str>
>> <str name="parsedquery">+((DisjunctionMaxQuery((blah:mickey))
>> DisjunctionMaxQuery((blah:mouse)))~2)
>> DisjunctionMaxQuery((blah_exact:"mickey mouse"))</str>
>> <str name="parsedquery_toString">+(((blah:mickey) (blah:mouse))~2)
>> (blah_exact:"mickey mouse")</str>
>> However, If I put in the field I want, for some reason that phrase portion
>> of the query just completely drops off:
>> http://localhost:8080/solr/collection1/select?qt=%2Fsearch&q=mickey%20mouse&debugQuery=on&defType=edismax&pf=name_exact&qf=name
>> Results:
>> <str name="rawquerystring">mickey mouse</str>
>> <str name="querystring">mickey mouse</str>
>> <str name="parsedquery">+((DisjunctionMaxQuery((name:mickey))
>> DisjunctionMaxQuery((name:mouse)))~2) ()</str>
>> <str name="parsedquery_toString">+(((name:mickey) (name:mouse))~2) ()</str>
>> The name_exact field's analyzer uses KeywordTokenizer, but again, I think
>> this query is being formed too early in the process for that to matter at
>> this point
>> --
>> View this message in context:
>> Sent from the Solr - User mailing list archive at

View raw message