|
Ian Lea |
at Jul 20, 2011 at 9:15 am
|
⇧ |
| |
FieldInvertState is passed to Similarity.computeNorm, as Robert said.
So your custom Similarity just has to override computeNorm(String
field, FieldInvertState state) and can extract whatever it wants from
the FieldInvertState passed in.
--
Ian.
On Wed, Jul 20, 2011 at 9:14 AM, bryant88 wrote:Ok. I need to use this class to get length of a given field at index time to
pass it as parameter to the computeNorm method from a custom Similarity.
The issue is that i don't know how to get a FieldInvertState object and
precisely i didn't understand if I have to create and populate it myself or
there is a method that, passed a field name (or something like
myField.getFieldInvertState() ), returns a FieldInvertState object with all
its parameters (i.e. position,length, numOverlap, offset and boost) already
populated.
--
View this message in context:
http://lucene.472066.n3.nabble.com/use-of-FieldInvertState-class-tp3182214p3184835.htmlSent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]For additional commands, e-mail:
[email protected] ---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]For additional commands, e-mail:
[email protected]