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

Add an example search handler #7

Open
Treggats opened this issue May 15, 2013 · 6 comments
Open

Add an example search handler #7

Treggats opened this issue May 15, 2013 · 6 comments
Assignees

Comments

@Treggats
Copy link
Collaborator

I was thinking, would it be an idea to add an example search handler?
That way you have an example for the solr implementation and the clientside implementation. As a bonus you can minimize the getSearchURL function :)

@ghost ghost assigned fergiemcdowall May 15, 2013
@fergiemcdowall
Copy link
Owner

Sounds interesting, but I'm not sure I follow. What is a Handler in this context?

@Treggats
Copy link
Collaborator Author

Server side solr, in solrconfig.xml

<requestHandler name="/search" class="solr.SearchHandler">
(...)
</requestHandler>

in there you can config your defaults for facets, spellcheck, highlighter etc..
See http://wiki.apache.org/solr/SolrRequestHandler

@fergiemcdowall
Copy link
Owner

Oh- I see :) Good point!

I really want Solrstrap to work with an "out of the box" Solr installation, so that it works as quickly as possible for the most possible people- even if it is kind of messy. So anything that involves a change to solrconfig.xml is (at the moment) out.

@Treggats
Copy link
Collaborator Author

Then you need to make every option available in the getSearchURL function, which in most cases is not what you want.

@fergiemcdowall
Copy link
Owner

The way it is set up now definitely sacrifices code-prettiness in getSearchURL for ease of setup. Although getSearchURL is moderately hairy its not totally spaghetti (yet). Setting a SearchHandler would make getSearchURL simpler and the solconfig.xml more complex.

@Treggats
Copy link
Collaborator Author

You make it sound like having a good configured searchHandler is a bad thing?
Solr is made that way so that you configure it that way, besides that there are some security issues tied to having every option in the url of the searchHandler.
Not sure what those are at the moment though

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

No branches or pull requests

2 participants