You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Avi Drissman <av...@baseview.com> on 2005/06/23 17:09:57 UTC
Is a field in use?
Suppose I have an index with a varying number of fields in a
document. Some documents have some fields, and some documents have
others. Is there a quick way to query the index to see if a
particular field name is in use at all by any document in the index?
For example, if document 1 has fields (A, B, C), document 2 fields
(B, C, D), document 3 fields (A, E, F), then document 2 is deleted, I
need to be able to answer, "Does any document have field 'D'" with "no".
Thanks.
Avi
--
Avi 'rlwimi' Drissman
avi@baseview.com
Argh! This darn mail server is trunca
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Is a field in use?
Posted by Avi Drissman <av...@baseview.com>.
On Jun 23, 2005, at 2:19 PM, Daniel Naber wrote:
> Maybe IndexReader.getFieldNames()?
But will that not list fields that were in use at one time but are no
longer?
Avi
--
Avi 'rlwimi' Drissman
avi@baseview.com
Argh! This darn mail server is trunca
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Is a field in use?
Posted by Daniel Naber <lu...@danielnaber.de>.
On Thursday 23 June 2005 17:09, Avi Drissman wrote:
> Suppose I have an index with a varying number of fields in a
> document. Some documents have some fields, and some documents have
> others. Is there a quick way to query the index to see if a
> particular field name is in use at all by any document in the index?
Maybe IndexReader.getFieldNames()?
--
http://www.danielnaber.de
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Is a field in use?
Posted by Avi Drissman <av...@baseview.com>.
On Jun 23, 2005, at 2:37 PM, Dan Armbrust wrote:
> In my indexes where the available fields vary by document, I
> maintain an additional field that lists out what fields are in used
> per document.
Excellent idea! Thanks.
Avi
--
Avi 'rlwimi' Drissman
avi@baseview.com
Argh! This darn mail server is trunca
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Is a field in use?
Posted by Dan Armbrust <da...@gmail.com>.
In my indexes where the available fields vary by document, I maintain an
additional field that lists out what fields are in used per document.
That way, I can query for all documents that contain field "foo", or all
documents that contain a field "foo", and don't contain "bar"... etc.
Avi Drissman wrote:
> Suppose I have an index with a varying number of fields in a
> document. Some documents have some fields, and some documents have
> others. Is there a quick way to query the index to see if a
> particular field name is in use at all by any document in the index?
>
> For example, if document 1 has fields (A, B, C), document 2 fields
> (B, C, D), document 3 fields (A, E, F), then document 2 is deleted, I
> need to be able to answer, "Does any document have field 'D'" with "no".
>
> Thanks.
>
> Avi
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org