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 Beijing2008 <al...@126.com> on 2008/08/26 04:42:05 UTC

How to get all terms with a special field and document after indexed

When a document add to index, fields data will split to many terms and saved
into index. Now, How can I get these terms with special field and special
document from index.


-- 
View this message in context: http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19154961.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: How to get all terms with a special field and document after indexed

Posted by Michael McCandless <lu...@mikemccandless.com>.
It sounds like TermVectors may apply here?

The TermVectors for a doc are like a miniature inverted index just for  
that one document.  It lets you retrieve all terms and their  
frequencies, plus optionally offset and positions information for each  
term occurrence.

Mike

Beijing2008 wrote:

>
> Very Thanks. But I'm sorry I can not catch what's your meaning.
>
> A sentence through Analyzer.TokenStream method and will get a  
> TokenStream
> result. this TokenStream will save into index with someway, now I'm  
> just to
> get all token for this input sentence from index.
>
> my english is very pool, maybe my artical can not easy to  
> understand, so
> sorry...
>
>
> 过佳 wrote:
>>
>> I like your nick name.
>>
>> For the question,  I think you must iterate all the terms in index  
>> with
>> TermEnum and see if term will satisfy any of your concerns.
>>
>> Best
>>
>> 2008/8/26 Beijing2008 <al...@126.com>
>>
>>>
>>> When a document add to index, fields data will split to many terms  
>>> and
>>> saved
>>> into index. Now, How can I get these terms with special field and  
>>> special
>>> document from index.
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19154961.html
>>> Sent from the Lucene - Java Users mailing list archive at  
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19155377.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: How to get all terms with a special field and document after indexed

Posted by Beijing2008 <al...@126.com>.
Very Thanks. But I'm sorry I can not catch what's your meaning.

A sentence through Analyzer.TokenStream method and will get a TokenStream
result. this TokenStream will save into index with someway, now I'm just to
get all token for this input sentence from index.

my english is very pool, maybe my artical can not easy to understand, so
sorry...


过佳 wrote:
> 
> I like your nick name.
> 
> For the question,  I think you must iterate all the terms in index with
> TermEnum and see if term will satisfy any of your concerns.
> 
> Best
> 
> 2008/8/26 Beijing2008 <al...@126.com>
> 
>>
>> When a document add to index, fields data will split to many terms and
>> saved
>> into index. Now, How can I get these terms with special field and special
>> document from index.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19154961.html
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19155377.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Re: How to get all terms with a special field and document after indexed

Posted by "Jarvis.Guo" <nt...@gmail.com>.
I like your nick name.

For the question,  I think you must iterate all the terms in index with
TermEnum and see if term will satisfy any of your concerns.

Best

2008/8/26 Beijing2008 <al...@126.com>

>
> When a document add to index, fields data will split to many terms and
> saved
> into index. Now, How can I get these terms with special field and special
> document from index.
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-get-all-terms-with-a-special-field-and-document-after-indexed-tp19154961p19154961.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>