Can I use per field analyzers and dynamic fields?

2010-05-05 Thread Paolo Castagna
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 differe

Re: Can I use per field analyzers and dynamic fields?

2010-05-05 Thread Erik Hatcher
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 el

Re: Can I use per field analyzers and dynamic fields?

2010-05-05 Thread Paolo Castagna
Hi Erik, first of all, thanks for your reply. The "source" of my problems is the fact that I do not know in advance the field names. Users are allowed to decide they own field names, they can, at runtime, add new fields and different Lucene documents might have different field names. So, in addit

Re: Can I use per field analyzers and dynamic fields?

2010-05-05 Thread Paolo Castagna
On 5 May 2010 14:19, Erik Hatcher wrote: > But, I think you need to elaborate on what you're doing in your Lucene > application to know more specifically. Hi Erik, perhaps, this is another way to explain and maybe solve my issue... At query time (everything here is just an illustrative example):

Re: Can I use per field analyzers and dynamic fields?

2010-05-07 Thread Chris Hostetter
: : The "source" of my problems is the fact that I do not know in advance the : field names. Users are allowed to decide they own field names, they can, : at runtime, add new fields and different Lucene documents might have : different field names. I would suggest you abstract away the field name

Re: Can I use per field analyzers and dynamic fields?

2010-05-09 Thread Paolo Castagna
Hi, thank you for your reply. What you suggested is a good idea and I am probably going to follow it. However, I'd like to hear a comment on the approach of doing the parsing using Lucene and then constructing a SolrQuery from a Lucene Query: QueryParser parser = new QueryParser("", analyzer)

Re: Can I use per field analyzers and dynamic fields?

2010-05-12 Thread Chris Hostetter
: However, I'd like to hear a comment on the approach of doing the parsing : using Lucene and then constructing a SolrQuery from a Lucene Query: I believe you are asking about doing this in the client code? using the Lucene QueryParser to parse a string using an analyzer, then toString'ing that

Re: Can I use per field analyzers and dynamic fields?

2010-05-12 Thread Paolo Castagna
Chris Hostetter wrote: : However, I'd like to hear a comment on the approach of doing the parsing : using Lucene and then constructing a SolrQuery from a Lucene Query: I believe you are asking about doing this in the client code? using the Lucene QueryParser to parse a string using an analyzer,