-----Original message-----
> From:ksu wildcats <ksu.wildc...@gmail.com>
> Sent: Mon 20-Aug-2012 20:28
> To: solr-user@lucene.apache.org
> Subject: Re: Solr Custom Filter Factory - How to pass parameters?
> 
> Thanks Jack.
> 
> The information I want to pass is the "databasename" into which the analyzed
> data needs to be inserted.
> 
> As i was saying earlier, the set up we have is
> 1) we use embedded solr server with multi cores  - embedded into our webapp
> 2) support one index for each client - each client has a separate database
> (rdbms) and separate index (core)
> 3) dynamically create the config files when client request comes into our
> service for first time.
>    config files (schema xml) are separate but content is identifical for all
> cores.
> 
> The custom filter factory we want to add to chain of filters in schema.xml
> will process tokens and write them to the clients database.
> I am trying to figure out a way to retrieve the database name based on the
> information coming in request from client.
> 
> I hope this is clear.
> 
> Regarding your suggestion on ability to pass parameters in filed type
> definitions. Can you please point me to documentation or example on how to
> retrieve these parameter values from within filter factory?

You extend a TokenFilterFactory:
http://lucene.apache.org/core/4__0-BETA/analyzers-common/org/apache/lucene/analysis/util/TokenFilterFactory.html

which extends AbstractAnalysisFactory:
http://lucene.apache.org/core/4_0_0-BETA/analyzers-common/org/apache/lucene/analysis/util/AbstractAnalysisFactory.html

Use the get() method to get the parameters defined in the XML. Check how the 
stopfilter retrieves it's parameters:

http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/StopFilterFactory.java?view=markup

> 
> Also I am not familiar with "update processor". Any link to additional
> information on how to provide "update processor" will be greatly helpful.
> 
>    
> 
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-Custom-Filter-Factory-How-to-pass-parameters-tp4002217p4002231.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 

Reply via email to