lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: IFilter
Date Wed, 30 Apr 2003 22:22:23 GMT

On Wed, 30 Apr 2003 14:35:29 -0400, Erik Hatcher wrote:
>I was thinking of doing the iterate and just blindly adding all
>in the Map to a Document as fields.  But this brings up an issue
>actually will make the Metadata object necessary - what type are the
>fields in the map?  Text?  Keyword?  Date?  Should they be indexed? 
>Tokenized?  Stored?  Should the underlying document handler make

I think so, yes. 

>With your first example, though, the document handler implementation
>now important at the parent level, whereas I was aiming for
>more generic.
>These issues shed light on why this hasn't been done before and why
>may not be something that can (or should) be done generically with a
>simple interface.  There are a lot of domain-specific issues that
>crop up.

I feel a way around this, is by providing both a high- as well as 
low-level API. The high-level api involves passing the IFilter a 
Document, and it "does its thing". The low-level API provides more 
flexibility, with performance and convenience at a tradeoff (duh).
>>From client perspective,
aContentHandler.populate(new Document());

Map m = aContentHandler.getMetadata();
// iterate through map
Reader r = aContentHandler.getReader();
// add reader

Do you think this would satisfy 90% of requirements?

>    Erik

>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message