Terms, suggestions, spellcheck, more like this

Written by: Open Solr Administrator

Terms Suggestions:

http://us.opensolr.com/solr/opensolr/terms?q=*:*&terms.fl=content&wt=json&indent=true&start=0&rows=50&terms.limit=50&terms.regex=ho.*
Replace ho.* with your own regex for terms suggestions. Drupal should make that request automatically for you and provide your site search with relevant terms.
More documentation is available here also: http://wiki.apache.org/solr/TermsComponent
 

Spellcheck:

http://opensolr.com/solr/opensolr/spell?q=droopal%20hostang&spellcheck=true&spellcheck.collate=true&spellcheck.build=true&wt=json&indent=true&rows=0
Observe the q parameter has "silr histing" and spell check will automatically suggest the correction for both words (based on the indexed data dictionary, so it works for any language), AND it also suggests the collation of words based on my query.
More documentation on using the spellcheck component is also here: http://wiki.apache.org/solr/SpellCheckComponent
 

Generic terms Suggester:

http://us.opensolr.com/solr/opensolr/suggest?q=h%20sol

Observe that I just entered "h sol" as query and the system suggests terms that are correctly spelled based on the indexed data AND suggests a collation phrase. This may also be used instead of spellcheck. It works pretty much in the same way.
More info here: http://wiki.apache.org/solr/Suggester
 
In all those URLs, if you replace opensolr with your own collection name, and replace the query and regex with your own keywords you will be able to obtain suggestions and spellcheck for your own collection index.
 

More like this:

http://us.opensolr.com/solr/opensolr/select?q=terms%20suggestions&wt=json&indent=true&start=0&rows=1&mlt=true&mlt.fl=content
Observe how I just got 1 result and I enabled the mlt parameter and I told it to get me More documents like this,  using data from the content field. Note the mlt.fl parameter.

Putting it all together in our own opensolr search engine:

And here is a sample search engine built (by myself) in just 2 hours with all those for our opensolr website.
http://www.opensolr.com/solr_manager/search/opensolr?q=solr%20hosteng
Observe it has spell check, terms suggestions and everything else that is needed.