You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by ruby <rs...@gmail.com> on 2017/10/26 12:55:22 UTC
Edismax - bq taking precedence over pf
I'm noticing in my following query bq= is taking precedence over pf.
&q=Manufacturing
&qf=Catch_all_Copy_field
&pf=object_id^40+object_name^700
&bq=object_rating:(best)^10
&bq=object_rating:(candidate)^8
&bq=object_rating:(placeholder)^5
&bq=object_type_:(typeA)^10
&bq=object_type_:(typeB)^10
&bq=object_type_:(typeC)^10
My intention is to show all objects of typeA having "Manufacturing" in name
first
But I'm seeing all typeA,TypeB,TypeC objects are being listed first,
eventhough if their name is Not "Manufacturing".
Is my query correct or my understanding of pf and bq parameters correct?
Thanks
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Edismax - bq taking precedence over pf
Posted by Chris Hostetter <ho...@fucit.org>.
: ok. Shouldn't pf be applied on top of bq=? that way among the object_types
: boosted, if one has "Manufacturing" then it should be listed first?
No.
bq is an *additive* boost ... documents must match your "main query" to be
included, but if document X scores very high against the bq query, and
very low against hte main query, the cumulative score can still be higher
then a docuemnt Y which scores mid-range against both.
you can think of it under the covers esentially just taking your "q" (with
qf and ph fields) and your "bq" and building a query that looks like...
(+q bq)
...which is why what people should use 99% of the time is "boost" instead
of bq ... that creates a *multiplicitive* boost factor based on the
function specified (which can use the "query()" function to wrap an
arbitrary query) instead.
-Hoss
http://www.lucidworks.com/
Re: Edismax - bq taking precedence over pf
Posted by Josh Lincoln <jo...@gmail.com>.
I was asking about the field definitions from the schema.
It would also be helpful to see the debug info from the query. Just add
debug=true to see how the query and params were executed by solr and how
the calculation was done for each result.
On Thu, Oct 26, 2017 at 1:33 PM ruby <rs...@gmail.com> wrote:
> ok. Shouldn't pf be applied on top of bq=? that way among the object_types
> boosted, if one has "Manufacturing" then it should be listed first?
>
> following are my objects:
>
>
> <doc>
> <id>1</id>
> <object_name>Configuration</object_name>
> <object_type>typeA<object_type>
> <object_desc>Manufacturing</object_desc>
> <Catch_all_copy_field> <--catch all field where contents of all fields get
> copied to
> </doc>
>
> <doc>
> <id>2</id>
> <object_name>Manufacturing</object_name>
> <object_type>typeA<object_type>
> <object_desc>xyz</object_desc>
> <Catch_all_copy_field> <--catch all field where contents of all fields get
> copied to
> </doc>
>
> I'm hoping to get id=2 first then get id=1 but I'm not seeing that. is my
> understanding of qf= not correct?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
Re: Edismax - bq taking precedence over pf
Posted by ruby <rs...@gmail.com>.
ok. Shouldn't pf be applied on top of bq=? that way among the object_types
boosted, if one has "Manufacturing" then it should be listed first?
following are my objects:
<doc>
<id>1</id>
<object_name>Configuration</object_name>
<object_type>typeA<object_type>
<object_desc>Manufacturing</object_desc>
<Catch_all_copy_field> <--catch all field where contents of all fields get
copied to
</doc>
<doc>
<id>2</id>
<object_name>Manufacturing</object_name>
<object_type>typeA<object_type>
<object_desc>xyz</object_desc>
<Catch_all_copy_field> <--catch all field where contents of all fields get
copied to
</doc>
I'm hoping to get id=2 first then get id=1 but I'm not seeing that. is my
understanding of qf= not correct?
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Edismax - bq taking precedence over pf
Posted by Josh Lincoln <jo...@gmail.com>.
What's the analysis configuration for the object_name field and fieldType?
Perhaps the query is matching your catch-all field, but not the object_name
field, and therefore the pf boost never happens.
On Thu, Oct 26, 2017 at 8:55 AM ruby <rs...@gmail.com> wrote:
> I'm noticing in my following query bq= is taking precedence over pf.
>
> &q=Manufacturing
> &qf=Catch_all_Copy_field
> &pf=object_id^40+object_name^700
> &bq=object_rating:(best)^10
> &bq=object_rating:(candidate)^8
> &bq=object_rating:(placeholder)^5
> &bq=object_type_:(typeA)^10
> &bq=object_type_:(typeB)^10
> &bq=object_type_:(typeC)^10
>
> My intention is to show all objects of typeA having "Manufacturing" in name
> first
>
> But I'm seeing all typeA,TypeB,TypeC objects are being listed first,
> eventhough if their name is Not "Manufacturing".
>
> Is my query correct or my understanding of pf and bq parameters correct?
>
> Thanks
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>