See the javadocs for IndexReader.getFieldNames(IndexReader.FieldOption
fldOption). Also see the javadocs for your "Why isn't this correct?"
question.

Reading Lucene In Action is highly recommended for all people new to lucene.


--
Ian.


On Thu, Jun 9, 2011 at 9:03 AM, Pranav goyal <pranavgoyal40...@gmail.com> wrote:
> Hi,
>
> I want to retrieve all the field names from my index so that I can store
> them in an array to use in MutiFieldQueryParser.
> One question can I do it using my index directory? If yes then a piece of
> code would be really helpful as I searched out a lot but no documentation is
> there on this thing.
>
> Why I want to do it using index directory is because my indexing code and
> searching codes are in a different file. So it would be better if I can
> access field names using the directory.
>
> I tried with
>
> IndexReader ir = new IndexReader(FSDirectory.open(indexDir));
>
> Why isn't this correct?
>
> I am a newbie in lucene, so may be these doubts can be silly.
>
> Thanks
>

---------------------------------------------------------------------
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