Re: When is/should qf different from pf?

2013-10-29 Thread Jason Hellman
It is probable that with no addition boost to pf fields that the sum of the 
scores will be higher.  But it is *possible* that they are not, and adding a 
boost to pf gives greater probability that they will be.

All of this bears testing to confirm what search use cases merit what level of 
boost.  No boost value is universally right…so YMMV, etc...

On Oct 29, 2013, at 9:30 AM, xavier jmlucjav  wrote:

> I am confused, wouldn't a doc that match both the phrase and the term
> queries have a better score than a doc matching only the term score, even
> if qf and pf are the same??
> 
> 
> On Mon, Oct 28, 2013 at 7:54 PM, Upayavira  wrote:
> 
>> There'd be no point having them the same.
>> 
>> You're likely to include boosts in your pf, so that docs that match the
>> phrase query as well as the term query score higher than those that just
>> match the term query.
>> 
>> Such as:
>> 
>>  qf=text description&pf=text^2 description^4
>> 
>> Upayavira
>> 
>> On Mon, Oct 28, 2013, at 05:44 PM, Amit Nithian wrote:
>>> Thanks Erick. Numeric fields make sense as I guess would strictly string
>>> fields too since its one  term? In the normal text searching case though
>>> does it make sense to have qf and pf differ?
>>> 
>>> Thanks
>>> Amit
>>> On Oct 28, 2013 3:36 AM, "Erick Erickson" 
>>> wrote:
>>> 
 The facetious answer is "when phrases aren't important in the fields".
 If you're doing a simple boolean match, adding phrase fields will add
 expense, to no good purpose etc. Phrases on numeric
 fields seems wrong.
 
 FWIW,
 Erick
 
 
 On Mon, Oct 28, 2013 at 1:03 AM, Amit Nithian 
>> wrote:
 
> Hi all,
> 
> I have been using Solr for years but never really stopped to wonder:
> 
> When using the dismax/edismax handler, when do you have the qf
>> different
> from the pf?
> 
> I have always set them to be the same (maybe different weights) but
>> I was
> wondering if there is a situation where you would have a field in
>> the qf
> not in the pf or vice versa.
> 
> My understanding from the docs is that qf is a term-wise hard filter
 while
> pf is a phrase-wise boost of documents who made it past the "qf"
>> filter.
> 
> Thanks!
> Amit
> 
 
>> 



Re: When is/should qf different from pf?

2013-10-29 Thread xavier jmlucjav
I am confused, wouldn't a doc that match both the phrase and the term
queries have a better score than a doc matching only the term score, even
if qf and pf are the same??


On Mon, Oct 28, 2013 at 7:54 PM, Upayavira  wrote:

> There'd be no point having them the same.
>
> You're likely to include boosts in your pf, so that docs that match the
> phrase query as well as the term query score higher than those that just
> match the term query.
>
> Such as:
>
>   qf=text description&pf=text^2 description^4
>
> Upayavira
>
> On Mon, Oct 28, 2013, at 05:44 PM, Amit Nithian wrote:
> > Thanks Erick. Numeric fields make sense as I guess would strictly string
> > fields too since its one  term? In the normal text searching case though
> > does it make sense to have qf and pf differ?
> >
> > Thanks
> > Amit
> > On Oct 28, 2013 3:36 AM, "Erick Erickson" 
> > wrote:
> >
> > > The facetious answer is "when phrases aren't important in the fields".
> > > If you're doing a simple boolean match, adding phrase fields will add
> > > expense, to no good purpose etc. Phrases on numeric
> > > fields seems wrong.
> > >
> > > FWIW,
> > > Erick
> > >
> > >
> > > On Mon, Oct 28, 2013 at 1:03 AM, Amit Nithian 
> wrote:
> > >
> > > > Hi all,
> > > >
> > > > I have been using Solr for years but never really stopped to wonder:
> > > >
> > > > When using the dismax/edismax handler, when do you have the qf
> different
> > > > from the pf?
> > > >
> > > > I have always set them to be the same (maybe different weights) but
> I was
> > > > wondering if there is a situation where you would have a field in
> the qf
> > > > not in the pf or vice versa.
> > > >
> > > > My understanding from the docs is that qf is a term-wise hard filter
> > > while
> > > > pf is a phrase-wise boost of documents who made it past the "qf"
> filter.
> > > >
> > > > Thanks!
> > > > Amit
> > > >
> > >
>


Re: When is/should qf different from pf?

2013-10-28 Thread Upayavira
There'd be no point having them the same.

You're likely to include boosts in your pf, so that docs that match the
phrase query as well as the term query score higher than those that just
match the term query.

Such as:

  qf=text description&pf=text^2 description^4

Upayavira

On Mon, Oct 28, 2013, at 05:44 PM, Amit Nithian wrote:
> Thanks Erick. Numeric fields make sense as I guess would strictly string
> fields too since its one  term? In the normal text searching case though
> does it make sense to have qf and pf differ?
> 
> Thanks
> Amit
> On Oct 28, 2013 3:36 AM, "Erick Erickson" 
> wrote:
> 
> > The facetious answer is "when phrases aren't important in the fields".
> > If you're doing a simple boolean match, adding phrase fields will add
> > expense, to no good purpose etc. Phrases on numeric
> > fields seems wrong.
> >
> > FWIW,
> > Erick
> >
> >
> > On Mon, Oct 28, 2013 at 1:03 AM, Amit Nithian  wrote:
> >
> > > Hi all,
> > >
> > > I have been using Solr for years but never really stopped to wonder:
> > >
> > > When using the dismax/edismax handler, when do you have the qf different
> > > from the pf?
> > >
> > > I have always set them to be the same (maybe different weights) but I was
> > > wondering if there is a situation where you would have a field in the qf
> > > not in the pf or vice versa.
> > >
> > > My understanding from the docs is that qf is a term-wise hard filter
> > while
> > > pf is a phrase-wise boost of documents who made it past the "qf" filter.
> > >
> > > Thanks!
> > > Amit
> > >
> >


Re: When is/should qf different from pf?

2013-10-28 Thread Amit Nithian
Thanks Erick. Numeric fields make sense as I guess would strictly string
fields too since its one  term? In the normal text searching case though
does it make sense to have qf and pf differ?

Thanks
Amit
On Oct 28, 2013 3:36 AM, "Erick Erickson"  wrote:

> The facetious answer is "when phrases aren't important in the fields".
> If you're doing a simple boolean match, adding phrase fields will add
> expense, to no good purpose etc. Phrases on numeric
> fields seems wrong.
>
> FWIW,
> Erick
>
>
> On Mon, Oct 28, 2013 at 1:03 AM, Amit Nithian  wrote:
>
> > Hi all,
> >
> > I have been using Solr for years but never really stopped to wonder:
> >
> > When using the dismax/edismax handler, when do you have the qf different
> > from the pf?
> >
> > I have always set them to be the same (maybe different weights) but I was
> > wondering if there is a situation where you would have a field in the qf
> > not in the pf or vice versa.
> >
> > My understanding from the docs is that qf is a term-wise hard filter
> while
> > pf is a phrase-wise boost of documents who made it past the "qf" filter.
> >
> > Thanks!
> > Amit
> >
>


Re: When is/should qf different from pf?

2013-10-28 Thread Erick Erickson
The facetious answer is "when phrases aren't important in the fields".
If you're doing a simple boolean match, adding phrase fields will add
expense, to no good purpose etc. Phrases on numeric
fields seems wrong.

FWIW,
Erick


On Mon, Oct 28, 2013 at 1:03 AM, Amit Nithian  wrote:

> Hi all,
>
> I have been using Solr for years but never really stopped to wonder:
>
> When using the dismax/edismax handler, when do you have the qf different
> from the pf?
>
> I have always set them to be the same (maybe different weights) but I was
> wondering if there is a situation where you would have a field in the qf
> not in the pf or vice versa.
>
> My understanding from the docs is that qf is a term-wise hard filter while
> pf is a phrase-wise boost of documents who made it past the "qf" filter.
>
> Thanks!
> Amit
>


When is/should qf different from pf?

2013-10-27 Thread Amit Nithian
Hi all,

I have been using Solr for years but never really stopped to wonder:

When using the dismax/edismax handler, when do you have the qf different
from the pf?

I have always set them to be the same (maybe different weights) but I was
wondering if there is a situation where you would have a field in the qf
not in the pf or vice versa.

My understanding from the docs is that qf is a term-wise hard filter while
pf is a phrase-wise boost of documents who made it past the "qf" filter.

Thanks!
Amit