Re: omiting no price documents when sorting on price

2008-11-28 Thread Chris Hostetter
: 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. FWIW: i'm not sure if by "omit these items" you really mean "don't include them in the results at all" .. in whi

Re: omiting no price documents when sorting on price

2008-11-27 Thread Erik Hatcher
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 N

Re: omiting no price documents when sorting on price

2008-11-27 Thread joeMcElroy
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

Re: omiting no price documents when sorting on price

2008-11-26 Thread Matthew Runo
You also don't /need/ to put in a price in the index. If something doesn't have a value for a field, you can just not send the field. Then sorting won't be thrown off by the dummy value. Then those documents simply won't have a "price" field. Of course, if you need to facet on it or query i

Re: omiting no price documents when sorting on price

2008-11-26 Thread Erick Erickson
Assuming you know you want to do this at query time, couldn't you just add a -price:0 clause to your query? Best Erick On Wed, Nov 26, 2008 at 11:00 AM, joeMcElroy <[EMAIL PROTECTED]> wrote: > > im sure this is an easy question but... > > when a product doesn't have a price, I index the price as