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 John Wang <jo...@gmail.com> on 2008/03/25 18:32:05 UTC
random accessing term value
Hi:
Is there a way to random accessing term value in a field? e.g.
in my field, content, the terms are: lucene, is, cool
Is there a way to access content[2] -> cool?
Thanks
-John
Re: random accessing term value
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
You can store term vectors with positions too. Wouldn't that work
for this case?
Erik
On Mar 25, 2008, at 11:59 PM, John Wang wrote:
> I am not sure how term vectors would help me. Term vectors are
> ordered by
> frequency, not in lex order. Since I know in the dictionary the
> terms are
> ordered by lex, seems it is possible for me to randomly get the nth
> term in
> the dictionary without having to seek to it.
>
> Thoughts?
>
> Thanks
>
> -John
>
> On Tue, Mar 25, 2008 at 11:16 AM, Erik Hatcher
> <er...@ehatchersolutions.com>
> wrote:
>
>>
>> On Mar 25, 2008, at 1:32 PM, John Wang wrote:
>>> Is there a way to random accessing term value in a field? e.g.
>>>
>>> in my field, content, the terms are: lucene, is, cool
>>>
>>> Is there a way to access content[2] -> cool?
>>
>> Via term vectors, or reanalysis of the field are two that come to
>> mind. Maybe other ways?
>>
>> Erik
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: random accessing term value
Posted by John Wang <jo...@gmail.com>.
I am not sure how term vectors would help me. Term vectors are ordered by
frequency, not in lex order. Since I know in the dictionary the terms are
ordered by lex, seems it is possible for me to randomly get the nth term in
the dictionary without having to seek to it.
Thoughts?
Thanks
-John
On Tue, Mar 25, 2008 at 11:16 AM, Erik Hatcher <er...@ehatchersolutions.com>
wrote:
>
> On Mar 25, 2008, at 1:32 PM, John Wang wrote:
> > Is there a way to random accessing term value in a field? e.g.
> >
> > in my field, content, the terms are: lucene, is, cool
> >
> > Is there a way to access content[2] -> cool?
>
> Via term vectors, or reanalysis of the field are two that come to
> mind. Maybe other ways?
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: random accessing term value
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 25, 2008, at 1:32 PM, John Wang wrote:
> Is there a way to random accessing term value in a field? e.g.
>
> in my field, content, the terms are: lucene, is, cool
>
> Is there a way to access content[2] -> cool?
Via term vectors, or reanalysis of the field are two that come to
mind. Maybe other ways?
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org