[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Negative boosts
From:       Chris Hostetter <hossman_lucene () fucit ! org>
Date:       2006-12-15 1:11:18
Message-ID: Pine.LNX.4.58.0612141708020.32324 () hal ! rescomp ! berkeley ! edu
[Download RAW message or body]


: > function that will give me a bigger boost for field values closer to
: > zero?
:
: The syntax could possibly change in the future, but look at the syntax in
: the javadoc for parseFunction in
: http://incubator.apache.org/solr/docs/api/org/apache/solr/search/QueryParsing.html
:
: Then when using the query parser syntax, use _val_ to activate it.
: So you get things like _val_:linear(myfield,1,2)

two things to note:

  1) if you are using dismax, the "bf" param parses functions directly, so
you don't need the _val_ hack.
  2) the "rord" function lets you access the "reverse ordinal" value of a
field, so the higher the value, the lower the number returned by hte
function.  if you have a garunteed sequential ordering for your field,
then you'll get an even distribution out of rord(fieldName)





-Hoss

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic