Re: use of FieldInvertState class

2011-07-20 Thread bryant88
Ok thanks, maybe i understood. I will try to store the field length in a Map in my custom Similarity and then pick them with a getLength() method and then divide it by the number of docs so i can have the average length of a field. thank you Raffaele Branda -- View this message in context:

Re: use of FieldInvertState class

2011-07-20 Thread Ian Lea
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:

Re: use of FieldInvertState class

2011-07-20 Thread bryant88
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 o

Re: use of FieldInvertState class

2011-07-19 Thread Robert Muir
On Tue, Jul 19, 2011 at 7:30 AM, Raffaele Branda wrote: > Dear Lucene developers, > > I am a student from an University in Italy and I am using Lucene for a > project. > > I need to use the *FieldInvertState* class in order to get all the values of > a given field state at indexing time. Is there