lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lex Lawrence" <lex_lawre...@hotmail.com>
Subject Re: Retrieving Field info from an index
Date Thu, 21 Mar 2002 11:32:10 GMT
Yes, I tried... and at first thought it was all working.  If you create a 
document and then access its fields immediately, it gives you everything.  
But if you store the document in an index, read it from the index, and then 
try to access the fields, you don't get them all.  Of the five standard 
Field types (Keyword, UnIndexed, Unstored, Text(String,String), 
Text(String,Reader)) two are missing (Unstored and Text(String,Reader)).  
See the attached test case, "FieldTest.java".

Thanks- Lex



>From: Otis Gospodnetic <otis_gospodnetic@yahoo.com>
>Reply-To: "Lucene Users List" <lucene-user@jakarta.apache.org>
>To: Lucene Users List <lucene-user@jakarta.apache.org>
>Subject: Re: Retrieving Field info from an index
>Date: Wed, 20 Mar 2002 22:19:18 -0800 (PST)
>
>Are you sure about this?
>Try:
><your Document instance>.getField("<your field name>");
>And also:
><your Document instance>.toString();
>
>Can you get/see your fields this way?
>I took a look at the source and it looks like Document's add method
>treats all Field types the same way, adds them to the same field list.
>
>Otis
>
>
>--- Lex Lawrence <lex_lawrence@hotmail.com> wrote:
> > Greetings-
> >
> > I am interested in getting information about the available Fields in
> > an
> > index.  Once I get hold of a Field object, it can provide everything
> > I need,
> > but I'm having trouble getting all of them.  I can use
> > Document.fields() to
> > get the "stored" Fields from an arbitrary document in the index.
> > But... how
> > can I get other Fields that may have been indexed and not stored?
> >
> > Thanks much!
> > -Lex
> >
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:lucene-user-help@jakarta.apache.org>
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards®
>http://movies.yahoo.com/
>
>--
>To unsubscribe, e-mail:   
><mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:lucene-user-help@jakarta.apache.org>
>


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Mime
View raw message