Skip to content

Using the Solr query UI

Gil Hoggarth edited this page Jan 10, 2015 · 2 revisions

The Solr query UI, shown below, provides a wealth of options for querying, sorting and count of your Solr index. The following table explains the use of many of these options. Note that a query executed through the UI displays the URL submitted to generate the results, seen at the top of this image. This is a great way to refine your queries.

  • q - The term or terms to be queried for. Note that the default*:* represents all values in all fields
  • sort - The retrieved data can be sorted using multiple values. The syntax is (field name) (asc|desc)
  • start, rows - Solr defaults to return the first ten results and provide pagination for the rest. You can specify the start position and number of results returned per page using these fields
  • fl - All field are displayed by default. However, this field can be used to restrict the query results to certain schema fields
  • hl - Add field names to have their values highlighted
  • wt - Select your choice of data format for the query data to be returned in

The 'facet' option provides a more detailed interface. Facets are counts corresponding to a query that can be categorised; these can be used to bound the dataset for further queries.

  • facet.query - The query definition to bound the category counts, such as price between 1&2, 3&4, etc.
  • facet.field - The field/s that should be treated as a facet

The Solr query language is one of its many strengths and adds to make Solr such a powerful query system. The resources available on the Apache Solr website are of great value to understanding these strengths and are thoroughly recommended.