You can omit documents. I recommend doing it with a filter query. Append the following to your request to Solr:

    &fq=-price:0

That does the trick? You'll have to have client logic to only add that parameter when sorting by price, if that's how you want it to work.

        Erik


On Nov 27, 2008, at 4:59 AM, joeMcElroy wrote:


was hoping there was an option to omit results with a certain value to stop
certain fields containing 0 skewing the search results.

i will try not sending the field if its 0. cheers!

joe


joeMcElroy wrote:

im sure this is an easy question but...

when a product doesn't have a price, I index the price as 0. When sorting on price, these values come up first or last. How can you omit these items
when sorting against price.

thanks

joe


--
View this message in context: 
http://www.nabble.com/omiting-no-price-documents-when-sorting-on-price-tp20703795p20716352.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to