11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

q=foo&fq={!collapse field=ISBN}&expand=true<br />

The “expand=true” parameter turns on the ExpandComponent. The ExpandComponent adds a new section to<br />

the search output labeled “expanded”.<br />

Inside the expanded section there is a map with each group head pointing to the expanded documents that are<br />

within the group. As applications iterate the main collapsed result set, they can access the expanded map to<br />

retrieve the expanded groups.<br />

The ExpandComponent has the following parameters:<br />

Parameter Description Default<br />

expand.sort Orders the documents within the expanded groups score<br />

desc<br />

expand.rows The number of rows to display in each group 5<br />

expand.q<br />

Overrides the main q parameter, determines which documents to include in the<br />

main group.<br />

main q<br />

expand.fq Overrides main fq's, determines which documents to include in the main group. main fq's<br />

Result Clustering<br />

The clustering (or cluster analysis) plugin attempts to automatically discover groups of related search hits<br />

(documents) and assign human-readable labels to these groups. By default in <strong>Solr</strong>, the clustering algorithm is<br />

applied to the search result of each single query—this is called an on-line clustering. While <strong>Solr</strong> contains an<br />

extension for for full-index clustering ( off-line clustering) this section will focus on discussing on-line clustering<br />

only.<br />

Clusters discovered for a given query can be perceived as dynamic facets. This is beneficial when regular<br />

faceting is difficult (field values are not known in advance) or when the queries are exploratory in nature. Take a<br />

look at the Carrot2 project's demo page to see an example of search results clustering in action (the groups in<br />

the visualization have been discovered automatically in search results to the right, there is no external<br />

information involved).<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

361

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!