It is true I need also this metadata at query time. For the moment, I put this extra information at the beginning of the data too be indexed and at the beginning of the query. It works, but I really don't like this. In my case, I need the language of the data to be index and the language of the query.
The goal is to dynamically use the correct chain of tokenizers and filters according to the language and so use only one field in my index for all languages. Lance Norskog-2 wrote: > > This is an interesting idea. There are other projects to make the > analyzer/filter chain more "porous", or open to outside interaction. > > A big problem is that queries are analyzed, too. If you want to give > the same metadata to the analyzer when doing a query against the > field, things get tough. You would need a special query parser to > implement your own syntax to do that. However, the analyzer chain in > the query phase does not receive the parsed query, so you have to in > some way change this. > > On Mon, Mar 8, 2010 at 2:14 AM, dbejean <dominique.bej...@eolya.fr> wrote: >> >> Hello, >> >> If I write a custom analyser that accept a specific attribut in the >> constructor >> >> public MyCustomAnalyzer(String myAttribute); >> >> Is there a way to dynamically send a value for this attribute from Solr >> at >> index time in the XML Message ? >> >> <add> >> <doc> >> <field name="content" myattribute="...">.....</field> >> >> >> Obviously, in Sorl shema.xml, the "content" field is associated to my >> custom >> Analyser. >> >> Thank you. >> >> Dominique >> >> -- >> View this message in context: >> http://old.nabble.com/More-contextual-information-in-analyser-tp27819298p27819298.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >> > > > > -- > Lance Norskog > goks...@gmail.com > > -- View this message in context: http://old.nabble.com/More-contextual-information-in-analyser-tp27819298p27831948.html Sent from the Solr - User mailing list archive at Nabble.com.