lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Multiple-field queries
Date Sun, 15 Oct 2006 05:02:34 GMT

: problematic with fields built from a Reader, because the Reader gets closed
: after the first field is indexed (and using a cloned Reader would require
: running a text extractor twice, which sounds wasteful of CPU cycles).
:
: Would it be possible to add to the API some method to add in on stroke
: multiple fields that share a same Reader, while using that Reader only once,
: or to define fields with an array of names (such as Field f = new
: Field(String[], Reader) ) rather than a single name?

I second Otis comments, but if you really want to "double up" your ata
into multiple fields, the simplest way to do this is reading from the
Reader yourself, buffering the data and passing it to each of the Field
instances seperately.

In general, different Tokenizers can be used for different fields, so
there's no general purpose way to impliment a method like you describe
that i can think of (because hte tokenizer is what reads from the Reader)



-Hoss


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


Mime
View raw message