* filter: See filters and Filtered Query
* fields: set of fields to return - http://www.elasticsearch.org/guide/reference/api/search/fields.html
* facets: specification of facets - see http://www.elasticsearch.org/guide/reference/api/search/facets/
Additions:
* q: either straight text or a hash will map directly onto a [query_string
query](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html)
in backend
* Of course this can be re-interpreted by different backends. E.g. some
may just pass this straight through e.g. for an SQL backend this could be
the full SQL query
* filters: array of ElasticSearch filters. These will be and-ed together for
execution.
**Examples**
{
q: 'quick brown fox',
filters: [
{ term: { 'owner': 'jones' } }
]
}
Facet – Store summary information (e.g. values and counts) about a field obtained by some 'faceting' or 'group by' method
Structure of a facet follows that of Facet results in ElasticSearch, see:
Specifically the object structure of a facet looks like (there is one
addition compared to ElasticSearch: the "id" field which corresponds to the
key used to specify this facet in the facet query):
{
"id": "id-of-facet",
// type of this facet (terms, range, histogram etc)
"_type" : "terms",
// total number of tokens in the facet
"total": 5,
// @property {number} number of records which have no value for the field
"missing" : 0,
// number of facet values not included in the returned facets
"other": 0,
// term object ({term: , count: ...})
"terms" : [ {
"term" : "foo",
"count" : 2
}, {
"term" : "bar",
"count" : 2
}, {
"term" : "baz",
"count" : 1
}
]
}
# Backends
1. Data is held in an in memory store on the Dataset object.
2. Data is transparently sourced from a backend store.