On 14-Feb-08, at 6:51 AM, tedonk03 wrote:


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

"or" is implied:

bq=location:Parramatta^1.4 location:NS^1.4

alternatively, you can use multiple bq's

bq=location:Parramatta^1.4
bq=location:NS^1.4

see http://wiki.apache.org/solr/SolrQuerySyntax

-Mike

Reply via email to