Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to be able to set the request handler #24

Open
elyograg opened this issue May 5, 2014 · 1 comment
Open

Need to be able to set the request handler #24

elyograg opened this issue May 5, 2014 · 1 comment

Comments

@elyograg
Copy link

elyograg commented May 5, 2014

SolrJ lets you set the request handler used for a particular query, if you need to use something besides /select. WebService::Solr does not.

http://lucene.apache.org/solr/4_8_0/solr-solrj/org/apache/solr/client/solrj/SolrQuery.html#setRequestHandler%28java.lang.String%29

In Solr versions before 3.6, the handleSelect parameter was set to "true" in the example config. This meant that you could send a "qt" parameter to change the handler being used.

Since 3.6, this way of configuring Solr is deprecated. All handlers are now expected to have names starting with a forward slash, which makes it possible to use them in the actual URL. A handler named "/select" will normally exist in a typical solrconfig.xml file. The big reason this change was made is so that you can't send a request to /select, set the qt parameter to "/update", and therefore change the index even when normal access to the /update handler is somehow blocked.

In the current code for this project, "/select" is not a single string. The forward slash is separate. In solrconfig.xml they are together. To match user expectations, this feature needs to work if "/other" (including the foward slash) is sent in as the handler name. If you want to include magic so that simply sending "other" will also work, that's fine.

@elyograg
Copy link
Author

elyograg commented May 5, 2014

An obvious followup -- make it possible to change the handler for update requests as well as queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants