Hey Chris,
wouldn't doing something like this in the query :
(field1:tag1 tag2) OR (field1:tag1 AND tag2)

Achieve similar affect ?

The documents that have all the tags (tag1 and tag2)  will comply with
both conditions and get scores from both while the documents that
don't have both tags will only get a score from the 1st (the OR)
condition therfore won't have higher score.

is this right ?



On 3/18/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:

: How do i force SOLR to score documents that contain ALL terms 1st
: before results that contain some of the terms?

generally speaking this is hte result you will usually on random data ...
under the covers Lucene uses TF/IDF based weighting of terms, with a coord
factor that penalizes queries that don't match all clauses -- but i'm sure
it's possible that sometimes the tf is so high and the idf so low, that
the score from one term can dominate.

the only solution to your problem that i can think of is to write a custom
Similarity class where tf and idf are fixed so only the coordFactor
matters.




-Hoss


Reply via email to