What does "not working properly" mean? An example would help.

What does adding &debug=query show in the two (debug=all in 3.x)? My
suspicion is that the second boost definition may be replacing the
first in 4.x, but that's only a guess.

Best,
Erick

On Wed, Apr 9, 2014 at 9:32 AM, Ugo Matrangolo <ugo.matrang...@gmail.com> wrote:
> Hi,
>
> we are using SOLR to power a sale listing page where each product has an
> availability and a position in the sale. We would like SOLR to partition
> the products based on their sold_out={true|false} state and to sort the two
> partitions by product position.
>
> We started with appending to the query two sort functions: (i)
> inventory(product_id): int returning 0 if the product is SOLD_OUT and the
> *sku_sale_look_position* to capture the position of the product in a
> particular sale.
>
> We ended up by appending the following to the query:
>
> &sort=inventory(id,sku_product_id)+desc,sku_sale_look_position+asc&debug=true'
>
>
> and it worked fine. However, we have been told that for performance
> reasons is better to boost docs based on these two functions thus we
> introduced these in our solrconfig.xml:
>
>
>       <str name="boost">inventory(id,sku_product_id)</str>
>
>       <str name="boost">recip(sku_sale_look_position, 1, 1, 1)</str>
>
>
> While these are working fine (same ordering of the first approach) in
> SOLR3.6 they stopped to work properly in SOLR4.+
>
> Has something changed in how SOLR uses boosting between SOLR3.6 and SOLR4+
> ?? Is boosting the best way to achieve our particular sorting requirement ??
>
> Regards and thank you,
> Ugo

Reply via email to