Wednesday, April 21, 2010

Commonly used SearchComponents

NameDescription and example query
QueryComponent
Responsible for submitting the query to Lucene and returning the list of Documents.



http://localhost:8983/solr/select?&q=iPod&start=0&rows=10
FacetComponentDetermines the facets for the set of results.



http://localhost:8983/solr/select?&q=iPod&start=0&rows=10&facet=true&facet.field=inStock
MoreLikeThisComponentFor each search result, finds documents that are similar (i.e. "More Like This") to that result and return those results as well.

http://localhost:8983/solr/select?&q=iPod&start=0&rows=10&mlt=true&mlt.fl=features&mlt.count=1
HighlightComponentHighlights the location of query terms in the text of the search results.



http://localhost:8983/solr/select?&q=iPod&start=0&rows=10&hl=true&hl.fl=name
DebugComponentReturns information about how the query was parsed, as well as details on why each document scored the way it did.


http://localhost:8983/solr/select?&q=iPod&start=0&rows=10&debugQuery=true
SpellCheckComponentSpell checks the input query and provides possible alternatives, based on the contents of the index.

http://localhost:8983/solr/spellCheckCompRH?&q=iPood&start=0&rows=10&spellcheck=true&spellcheck.build=true



How get it More link in SOLR give me Example?

For each search result, finds documents that are similar (i.e. "More Like This") to that result and return those results as well.

http://localhost:8983/solr/select?&q=iPod&start=0&rows=10&mlt=true&mlt.fl=features&mlt.count=1