lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Buso <nb...@ebi.ac.uk>
Subject Re: Retrieving FieldInfo
Date Tue, 14 May 2013 14:02:16 GMT
I now this can sound horrible/flexible/... but this mean I can add two
documents with the same field name, but different configurations, for
example different IndexOptions?


Nicola.

On Tue, 2013-05-14 at 12:52 +0100, Nicola Buso wrote:
> OK, thanks for the reply!
> 
> 
> Nicola.
> 
> On Tue, 2013-05-14 at 14:19 +0300, Shai Erera wrote:
> > If your documents always contain the same fields then yes. But in
> > general, you can do:
> > 
> > 
> > addDocument("f:value");
> > commit();
> > 
> > addDocument("c:value");
> > commit();
> > 
> > And each AtomicReader will contain different fields. As
> > getFieldInfos() documents "Get the {@link FieldInfos} describing all
> > fields in this reader."
> > 
> > 
> > Shai
> > 
> > 
> > 
> > On Tue, May 14, 2013 at 1:35 PM, Nicola Buso <nbuso@ebi.ac.uk> wrote:
> >         Hi,
> >         
> >         I was looking to a way to obtain FieldInfo(s) from the
> >         IndexReader; we
> >         need in some way to describe the index. Can I do this?
> >         --------
> >         AtomicReader ar = <indexReader>.leaves().get(0).reader();
> >         // than call
> >         ar.getFieldInfos();
> >         --------
> >         What I mean is, can I suppose every AtomicReader in leaves()
> >         contain the
> >         same informations about FieldInfos and I do not need to
> >         iterate over
> >         leaves()?
> >         
> >         
> >         Nicola.
> >         
> >         
> >         
> >         ---------------------------------------------------------------------
> >         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
> 



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


Mime
View raw message