: You can write your custom similarity implementation, and override the
: /lengthNorm()/ method to return a constant value.

The postered already said (twice!) that they have already set 
omitNorms=true, so lengthNorm won't even be used 

omiting norms (or mucking with norms by modifying the lengthNorm function) 
only affects the norms portion of the scoring -- the problem being 
described here is when a document matches the input term more then once: 
that is an issue of the "term freuency".

Setting omitTermFreqAndPositions="true" on your field type will eliminate 
the term frequency from the equation, and it will become a simple "match 
or not" factor in your scoring.

>From the "more then one way to do it" standpoint, another option is to 
wrap the query in a function that flattens the scores (more fine grained 
control, and doesn't require re-indexing, but probably less efficient)

q={!boost b=$cat_boost v=$main_query}
main_query=...
cat_boost={!func}map(map(query({!field f=cat v=$cat},-1),0,10000,5)-1,-1,1)
cat=...

(note: used nested maps so that non-matches would result in a 1x 
multipler, while matches result in a 5x multiplier)

-Hoss

Reply via email to