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 Lahiru Samarakoon <la...@gmail.com> on 2011/03/01 06:34:58 UTC

finding the length of a field

Hi all,

Is there a way to find the length of a field of a lucene index document?

Thanks,
Lahiru

Re: finding the length of a field

Posted by Lahiru Samarakoon <la...@gmail.com>.
Thanks nick, will try that

On Tue, Mar 1, 2011 at 12:00 PM, Nick Pellow <np...@atlassian.com> wrote:

> Have you considered storing the length of the field in a Payload?
> You could do that during analysis.
>
> Cheers,
> Nick
>
> On 01/03/2011, at 5:06 PM, Lahiru Samarakoon wrote:
>
> > Hi Anshum,
> >
> > I am trying to implement a custom length normalization mechanism, which
> > needs the length of the field being searched.
> >
> > Yes, the field is stored.
> >
> > Thanks,
> > Lahiru.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: finding the length of a field

Posted by Nick Pellow <np...@atlassian.com>.
Have you considered storing the length of the field in a Payload?
You could do that during analysis.

Cheers,
Nick

On 01/03/2011, at 5:06 PM, Lahiru Samarakoon wrote:

> Hi Anshum,
> 
> I am trying to implement a custom length normalization mechanism, which
> needs the length of the field being searched.
> 
> Yes, the field is stored.
> 
> Thanks,
> Lahiru.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: finding the length of a field

Posted by Lahiru Samarakoon <la...@gmail.com>.
Hi Anshum,

I am trying to implement a custom length normalization mechanism, which
needs the length of the field being searched.

Yes, the field is stored.

Thanks,
Lahiru.

Re: finding the length of a field

Posted by Anshum <an...@gmail.com>.
Hi Lahiru,
A few questions here.
Why would you need that? Is the field stored?

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Tue, Mar 1, 2011 at 11:04 AM, Lahiru Samarakoon <la...@gmail.com>wrote:

> Hi all,
>
> Is there a way to find the length of a field of a lucene index document?
>
> Thanks,
> Lahiru
>