On Tuesday 10 January 2006 07:32, Eric Jain wrote: > Paul Elschot wrote: > >>For example, a query for "europe" should rank: > >> > >>1. title:"Europe" > >>2. title:"History of Europe" > >>3. title:"Travel in Europe, Middle East and Africa" > >>4. subtitle:"Fairy Tales from Europe" > > > > Perhaps with this query (assuming the default implicit OR): > > > > title:europe subtitle:europe^0.5 body:europe > > This will ensure that match 4 appears at the end, but as far as I can see > this won't help with getting matches 1-3 ordered correctly? Note that match > 1 for example may have a "description" field that contains a lot terms, but > no mention of the query term.
In general, the length of a field that does not match does not influence the score, but it's still not easy to predict the order in this case. With an OR over multiple fields: - when a shorter field matches, it usually dominates the score for a document. - when other fields match, they contribute to the score via the sum score over the clauses and via the coordination factor in the DefaultSimilarity. In case you prefer to use the maximum score over the clauses you can use the DisjunctionMaxQuery from the development version. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]