You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by mark harwood <ma...@yahoo.co.uk> on 2013/01/25 17:11:55 UTC
3.6 - querying a no-norms field and getting document boost
I have a 3.6 index with many no-norms fields and a single text field with norms (a fairly common configuration). There is a document boost I have set at index-time that will have been encoded into the text field's norms.
If I query solely on a non-text field then the ranking does not apply the document-level boost.
Without re-indexing and adding norms where I don't want them, how do I most elegantly query field "A" and factor in the doc-boost already recorded in the "text" field's norms?
I appreciate DocValues in 4.x helps in this regard but looking for a clean/fast 3.6-based solution.
Any suggestions?
Re: 3.6 - querying a no-norms field and getting document boost
Posted by mark harwood <ma...@yahoo.co.uk>.
Answering my own question - add optional new MatchAllDocsQuery("text") clause to factor in the encoded norms from the "text" field.
________________________________
From: mark harwood <ma...@yahoo.co.uk>
To: "java-user@lucene.apache.org" <ja...@lucene.apache.org>
Sent: Friday, 25 January 2013, 16:11
Subject: 3.6 - querying a no-norms field and getting document boost
I have a 3.6 index with many no-norms fields and a single text field with norms (a fairly common configuration). There is a document boost I have set at index-time that will have been encoded into the text field's norms.
If I query solely on a non-text field then the ranking does not apply the document-level boost.
Without re-indexing and adding norms where I don't want them, how do I most elegantly query field "A" and factor in the doc-boost already recorded in the "text" field's norms?
I appreciate DocValues in 4.x helps in this regard but looking for a clean/fast 3.6-based solution.
Any suggestions?