Hi, I also have the same problem. My case is similar like this, but the user can select their preferences. I´ll use climbingrose´s example but add it a little bit.
Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1; longitude=x2] Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3; longitude=x4] Doc3: [Title=Java; Location=Parramatta] Doc4: [Title=Java; Location=NS, NSW; latitude=x1; longitude=x2] Doc5: [Title=Java; Location=NS, NSW; latitude=x3; longitude=x4] Doc6: [Title=Java; Location=Parramatta] For example the user query is Java and their preferences are Paramatta and NS, so I would like to boost the documents with location Paramatta or NS. But still I want to show the result from another location. How do I use it in bq? Can I use it like this: bq=location:Parramatta^1.4 || location:NS^1.4 is that correct? I tried but it seems it didn´t work. So the final result I want that NS and Paramatta get a little boost to the top and NOrth Ryde goes to the bottom. Is that possible? Thanx - Ted - Mike Klaas wrote: > > On 1-Jan-08, at 11:54 PM, climbingrose wrote: >> >> Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1; >> longitude=x2] >> Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3; >> longitude=x4] >> Doc3: [Title=Java; Location=Parramatta] >> >> My filter query looks like this: >> >> fq= (+latitude[lat1 TO lat2] +longitude[lng1 TO lng2]) >> location:Parramatta >> location:NSW >> >> Now assuming that my query matches those three documents, I need to >> make >> sure that documents with "Parramatta" in their locations have some >> kind of >> boost to the final score. For example, I'd like to have Doc3 listed >> before >> Doc2 because it has "Parramatta" in location field. >> >> Is this possible? Thanks in advance! > > Sure, just also add a boost parameter: > > fq= (+latitude[lat1 TO lat2] +longitude[lng1 TO lng2]) > location:Parramatta location:NSW > bq=location:Parramatta^1.4 > > -Mike > > -- View this message in context: http://www.nabble.com/Filter-Query-and-query-score-tp14574793p15480679.html Sent from the Solr - User mailing list archive at Nabble.com.