ListSolrResult-class: ListSolrResult

ListSolrResult-classR Documentation

ListSolrResult

Description

The SolrResult object represents the result of a Solr query and usually contains a collection of documents and/or facets. The default implementation, ListSolrResult, directly stores the canonical JSON response from Solr. It is usually obtained by evaluating a SolrQuery on a SolrCore, which most users will never do.

Accessors

Since ListSolrResult inherits from list, one can access the raw JSON fields directly through the ordinary list accessors. One should only directly manipulate the Solr response when extending rsolr/Solr at a deep level. Higher-level accessors are described below.

  • docs(x): Returns the found documents as a DocList

  • ndoc(x): Returns the number of documents found

  • facets(x): Returns any computed Facets

  • groupings(x): If Solr was asked to group the documents in the response, this returns each Grouping (there can be more than one) in a list

  • ngroup(x): Returns the number of groups in each grouping

Author(s)

Michael Lawrence

See Also

docs and facets on SolrCore are more convenient and usually sufficient


lawremi/rsolr documentation built on May 28, 2022, 6:17 a.m.