Paolo,

Solr takes care of associating fields with the proper analysis defined in schema.xml already. This, of course, depends on which query parser you're using, but both the standard Solr query parser and dismax do the right thing analysis-wise automatically.

But, I think you need to elaborate on what you're doing in your Lucene application to know more specifically. A dynamic field specification in Solr is associated with only a single field type, so you'll want to use different dynamic field patterns for different types of fields.

        Erik

On May 5, 2010, at 9:14 AM, Paolo Castagna wrote:

Hi,
I have an existing Lucene application which I want to port to Solr.

A scenario I need to support requires me to use dynamic fields
with Solr, since users can add new fields at runtime.

At the same time, the existing Lucene application is using a
PerFieldAnalyzerWrapper in order to use different analyzers
for different fields.

One possible solution (server side) requires a custom QParser
which would use a PerFieldAnalyzerWrapper, but perhaps
there is a better (client side only) way to do that.

Do you have any suggestion on how I could use per field
analyzers with dynamic fields?

Regards,
Paolo

Reply via email to