Is a field in use?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is a field in use?

Avi Drissman
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
[hidden email]
Argh! This darn mail server is trunca


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is a field in use?

Daniel Naber
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is a field in use?

Avi Drissman
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
[hidden email]
Argh! This darn mail server is trunca


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is a field in use?

Dan Armbrust
In reply to this post by Avi Drissman
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is a field in use?

Avi Drissman
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
[hidden email]
Argh! This darn mail server is trunca


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]