Also, if you don't like the tag solution, you could borrow something right from LIA... boost the documents that are "significant" products with 1.5 (or whatever higher then 1), and the support/ancillary products boot with .1
If there is nothing relavent in the "significant" products, at least you'll get some of these. After all they may search for "bolt" .... maybe they want an ancillary product. -----Original Message----- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 12:06 PM To: java-user@lucene.apache.org Subject: Re: get results by relevance, limiting results and then sort the results by some criterion So yes, if the xth + 1 item happens to be a camera and if its price happens to be lower than the previous x cameras it wont be included in this view and that is exactly what we want. Mufaddal Khumri wrote: > In my case when we search for lets say cameras , my top x results are > all sorts of cameras and then i get documents that match camera > casings etc. > > As a company we want to show as many cameras as possible and not other > camera > related products for this one web view on a specific page we have. On > this same page > we also want to provide a way that the user can select "price high to > low" or price low to high" and sort these top x results. Essentially > the hard part is to come up with the X so that you ideally dont prune > any cameras. > As a business we want to strive to get as many cameras in the search > results, but at the same time we dont mind if a few cameras do not > appear in those results if we can really fine tune our search results > to only show cameras and not camera casings and camera batteries etc. > > I have been looking at QueryFilter and the Sort API, but havent yet > figured out a way to do what I am trying to do .. any pointers are > greatly appreciated. > > -Thanks, > > John Powers wrote: > >> I'm sure you've taken care of this, but I am curious myself: >> >> If the 301 document only has a single term "batteries" (and thus is so >> far low on the Hits), but has a price of seven cents, then the sort of >> all the documents with "batteries" would put this near the top, but by >> eliminating all documents above 300, this one doesn't appear in the >> solution you are working for, correct? Why is that a good thing? >> It seems you would want to sort on the full document list, and then >> return on the 300 top that you want the user to see. >> I think I'm just curious why getting rid of some that could (in a new >> sort) be of higher relevance is a good thing. >> >> -----Original Message----- >> From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: >> Tuesday, February 21, 2006 10:33 AM >> To: java-user@lucene.apache.org >> Subject: get results by relevance, limiting results and then sort the >> results by some criterion >> >> When I do a search for example on "batteries" i get 1200+ results. I >> would like to show the user lets say 300. I can do that by only >> extracting the first 300 hits (sorted by decreasing relevance by >> default) and displaying those to the user. >> >> Now on the search results page, I have a drop down box that lets the >> user sort the results by price. When the user selects the "Sort by price >> >> low to high", i would like to be able to sort the same 300 hits I got >> above (sorted by decreasing relevance by default) by price. >> >> Essentially I want to be able to sort the first 300 relevant search >> results by price. (in other words I would like to be able to get >> search results by relevance, limit the results and sort the results >> by some criterion). >> >> What would be a good way to do this in lucene? >> >> -Thanks. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]