You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sivaprasad <si...@echidnainc.com> on 2010/11/22 12:21:29 UTC

How to write custom component

Hi,

I want to write a custom component which will be invoked before the query
parser.The out put of this component should go to the query parser.

How can i configure it in solrConfig.xml

How can i get SynonymFilterFactory object programmatically.

Please share your ideas.

Regards,
Siva
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-write-custom-component-tp1945093p1945093.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to write custom component

Posted by Grant Ingersoll <gs...@apache.org>.
On Nov 22, 2010, at 6:21 AM, sivaprasad wrote:

> 
> Hi,
> 
> I want to write a custom component which will be invoked before the query
> parser.The out put of this component should go to the query parser.

Probably best to start with http://wiki.apache.org/solr/SolrPlugins.  Also, have a look at the existing components, such as the TermsComponent or QueryComponent or SpellCheckComponent.

You might also want to consider explaining more what you are after (http://people.apache.org/~hossman/#xyproblem) before you go down the path.  Perhaps there is a way to do what you are after already?  Or perhaps you could just write a QParser that does what you need?

> 
> How can i configure it in solrConfig.xml

See the example, as it shows how to do it for the SpellCheckComponent.

> 
> How can i get SynonymFilterFactory object programmatically.

You should be able to just construct one.


--------------------------
Grant Ingersoll
http://www.lucidimagination.com