You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Qizhen Ruan <ru...@gmail.com> on 2010/02/26 03:39:26 UTC

Is it possible to set a property for the whole index?

Hi,

I need to set a property, "language", to all documents in the index.  But
for a single index, the language for all documents are the same.
Is that possible that I create a property for the index file instead of for
each document in it?
When I got the result from from multiple indexes search, could I know which
index the result belongs to?

Thanks,
Qizhen

Re: Is it possible to set a property for the whole index?

Posted by Moray McConnachie <mm...@oxford-analytica.com>.
Similar questions in the past have got the answer from this list "store index properties as fields of a single document. You only have to index that document by one field." 

You could alternatively store the language in the path of the index, which might give you an easy way to extend in future.

Our particular apps tend to use a named configuration section in .config files for this sort of thing. 

Yours,
Moray
------------------
Moray McConnachie
Director of IT,
Oxford Analytica


-----Original Message-----
From: Qizhen Ruan <ru...@gmail.com>
Date: Fri, 26 Feb 2010 10:39:26 
To: <lu...@lucene.apache.org>
Subject: Is it possible to set a property for the whole index?

Hi,

I need to set a property, "language", to all documents in the index.  But
for a single index, the language for all documents are the same.
Is that possible that I create a property for the index file instead of for
each document in it?
When I got the result from from multiple indexes search, could I know which
index the result belongs to?

Thanks,
Qizhen