On 8/22/07, Ard Schrijvers <[EMAIL PROTECTED]> wrote: >...When running a query for different field, I use the JRAnalyzerImpl as always, but by > returning different tokenStream based on an analyzer I implicitely use > different analyzers > for each field that have it configured like this. Since this analyzer is used > for indexing > *and* querying, on a per field basis, it will always work....
Sure, but what happens with Marcel's previous example (earlier in this thread): //*[jcr:contains(., 'hägar')] You won't know which field name to use to select an Analyzer, hence the need for a configurable default analyzer for queries. That's unless the above query translates to a big OR statement where each field is queried with its own analyzer, I don't know how it is currently implemented. > ...Might this be a better solution for Solr querying as well?... I think the default Solr query analyzer works as you indicate, but in Solr's case the problem is slightly easier as a search that does not specify a field name does not apply to all fields, but to a configurable set of default fields. So, consistent index/query analysis is easier to configure in Solr's case, but the problem is basically the same: allowing per-field analysis requires some clever analyzer (and/or documentation of the potential inconsistencies) when multi-field queries are used. -Bertrand
