oh, TermQuery works! it was my own mistake. thanks for the help!

Yuhan

On Wed, Jan 19, 2011 at 5:17 PM, Yuhan Zhang <yzh...@onescreen.com> wrote:

> Hi Paul and Earl,
>
> thanks.
>
> I tried TermQuery. it gave me back zero document my termDocs is also
> empty... having a feeling that
> no term was gathered if a field was not analyzed.
>
> Yuhan
>
>
> On Wed, Jan 19, 2011 at 1:15 PM, Earl Hood <e...@earlhood.com> wrote:
>
>> On Wed, Jan 19, 2011 at 2:11 PM, Paul Libbrecht <p...@hoplahup.net>
>> wrote:
>> > I think you should use a TermQuery.
>>
>> How about IndexReader.termDocs()?
>>
>>
>> >> I am trying to use
>> >> *IndexSearcher<
>> http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/IndexSearcher.html#IndexSearcher%28org.apache.lucene.store.Directory%29
>> >
>> >> * to retrieve a doc from an existing index by reading a field
>> >> that is NOT_ANALYZED. I am trying to use that field as a unique id to
>> >> retrieve a specific
>> >> document. The id will be a url. is this possible to do? which type of
>> query
>> >> should I use?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>>
>

Reply via email to