Let me just put in a vote to add the ability to have different analyzers per
field.
(More specifically, all I really need is a different set of stop words per
field... is that easily possible?)
Scott
-----Original Message-----
From: Doug Cutting [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 11:42 AM
To: 'Brian Goetz'; '[EMAIL PROTECTED]'
Subject: RE: [Lucene-dev] New QueryParser
> From: Brian Goetz [mailto:[EMAIL PROTECTED]]
>
> I could see two ways to address this issue:
>
> 1 (complicated way): When the index store is created, register an
> analyzer for each field (could be the same one.) A serialized copy of
> the analyzer is stored in the index base, and queries on that field
> are automatically processed with it.
Note that in Lucene the fields of an index are never declared up front,
they're instead implied as documents are added. The file to add this in
would be the field info file (.fnm), but this exists for every segment,
including the RAM-resident single-document segment that is first created for
each document as it is added. Serializing/deserializing analyzers to this
could be pretty heavy weight.
Currently a single analyzer is used for all fields that are tokenized, so
unless that is changed, this is moot.
> 2 (simpler, less complete way): Have a way of telling the query parser
> that "these fields use these analyzers", or at the very least, "these
> fields don't get tokenized with an analyzer."
Given lucene only supports one analyzer per index, the latter seems like
what's needed.
Another approach is to change lucene's index to track which fields were
tokenized and which weren't. This would be fairly easy to add. Then you
could simply pass in the IndexReader to the query parser and not analyze
untokenized fields. If that sounds like a sufficient solution, then I would
be willing to add tracking of which fields are tokenized to the indexing
code.
Doug
_______________________________________________
Lucene-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/lucene-dev
_______________________________________________
Lucene-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/lucene-dev