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 <[EMAIL PROTECTED]>
>Reply-To: "Lucene Users List" <[EMAIL PROTECTED]>
>To: Lucene Users List <[EMAIL PROTECTED]>
>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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards�
>http://movies.yahoo.com/
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
FieldTest.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
