lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <>
Subject Re: Can SOLR custom analyzer access another field's value?
Date Fri, 27 Mar 2015 17:02:55 GMT
You could pre-process the field values in an update processor. You can even
write a snippet in JavaScript. You could check one field and then redirect
a field to an alternate field which has a different analyzer.

What expectations do you have as to what analysis should occur at query

-- Jack Krupansky

On Fri, Mar 27, 2015 at 12:22 PM, Alex Sylka <> wrote:

> I am trying to write a custom analyzer , whose execution is determined by
> the value of another field within the document.
> For example if the locale field in the document has 'de' as the value, then
> the analizer would use the German set of tokenizers/filters to process the
> value of a field.
> My question is : how can a custom analyzer access the value of another
> field (in this case locale field) within a document, while analyzing the
> value of a specific field?
> There is a solution where we can prepend the locale value to the field's
> value like de|fieldvalue then custom analyzer can extract the locale while
> analyzing the field value. This seems a dirty solution. Is there any better
> solution ?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message