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 Ilia Sretenskii <sr...@multivi.ru> on 2014/10/15 13:46:04 UTC

Re: How can I pass in query request parameter at search time and know of it in my query analyzer/tokenizer?

You can implement your own kind of SeachHandler to pass your custom request
parameters to keep the common parameters clean.
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java

As you can see, the SearchHandler.handleRequestBody() method just takes
expected parameters from the SolrQueryRequest request.
Your own handler can expect more parameters than those defined in the
CommonParams interface.
https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java

These are the base classes whose extensions might be useful for the
development.
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/component/SearchComponent.java

You can find more information about the request handlers and the search
components in the guide.
https://cwiki.apache.org/confluence/display/solr/RequestHandlers+and+SearchComponents+in+SolrConfig