Are you using the dismax parser? (I try not to make assumptions that folks have /select mapped just like the example - which is mapped to Lucene/Solr query parser syntax)

  Add  &defType=dismax

And don't forget about good ol' &debugQuery=true ;)

        Erik


On Aug 1, 2008, at 6:06 PM, CameronL wrote:


Thanks Erik. That's a great idea, and it seems like this is exactly what the
bq parameter was made for.

Now the problem I seem to be having is that Solr seems to be ignoring the bq
parameter altogether. My query looks something like:
...select?q=name:something&bq=Tier:1^100 Tier:2^75 Tier:3^50

Essentially, this should order the results, but it doesn't. It's returning the exact same results as if the bq param was never there. However, if I
format my search like:
...select?q=name:something Tier:1^100 OR Tier:2^75 OR Tier:3^50
then I get the result I want. However, I want to utilize the bq param
instead so I don't have to append this to all of my queries.

Anyone have any ideas why my bq parameter doesn't seem to be working?



Erik Hatcher wrote:

How about tinkering with the boosting query (bq) parameter or the
boosting function (bf) parameter?

I believe clever bq'ing would probably do the trick, huh?

        Erik



On Jul 31, 2008, at 7:34 PM, CameronL wrote:


My problem is a little complex, so please bear with me.

I currently have a set of documents that need to be "tiered", and
depending
on what tier they are in, a configurable boost should be applied,
essentially affecting the score and ordering of the search results.

My first idea was to create 10 different fields in my schema for these
tiers:
<field name="Tier1" type="boolean" index="true" stored="false"/>
<field name="Tier2" type="boolean" index="true" stored="false"/>
...
<field name="Tier10" type="boolean" index="true" stored="false"/>

Each document may be part of 0 or 1 tiers.  Then, when a search is
requested, I would use the dismax handler to add different boosts to
the
tier fields: "Tier1^1.1 Tier2^1.2 Tier3^1.3..."

The desired effect is to give a little bit of boost to items that
are in
Tier 10 over items that are in, say, Tier 5 or in no tier.  That is,
for
items that also match the search term criteria (my default search
field is
"name").

As you can see, the flaw in my little plan above is that there isn't
really
a good way to factor in the Tier fields into the search.  I could
probably
try to add additional criteria (" AND Tier1:true OR Tier2:true...")
but it
still wouldn't work to include the documents that match the search
term but
have no tier.

Is there another technique I should be using to achieve my desired
effect?
I'm a little stuck; your help would be much appreciated.  Hope I am
making
sense.
--
View this message in context:
http://www.nabble.com/Dynamic-Boosting-tp18765678p18765678.html
Sent from the Solr - User mailing list archive at Nabble.com.




--
View this message in context: 
http://www.nabble.com/Dynamic-Boosting-tp18765678p18783406.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to