lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <kelvin-li...@relevanz.com>
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
>entries
>in the Map to a Document as fields.  But this brings up an issue
>that
>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
>these
>determinations?

I think so, yes. 

>
>With your first example, though, the document handler implementation
>is
>now important at the parent level, whereas I was aiming for
>something
>more generic.
>
>These issues shed light on why this hasn't been done before and why
>it
>may not be something that can (or should) be done generically with a
>simple interface.  There are a lot of domain-specific issues that
>can
>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,
High-level:
aContentHandler.populate(new Document());

Low-level:
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: lucene-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message