- Source:
Methods
addEntry(entry, firstopt) → {SearchList}
- Description:
Add an entry to the current search (result) list. Utilizes the this._sortedChildren of the {@see List} for the actual entries in memory.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entry |
Entry | |||
first |
boolean |
<optional> |
true
|
add on top of the list |
Returns:
- Type
- SearchList
getFacets() → {Array}
- Description:
Array of facets, each facet is an object which contains the following fields:
name - the solr search field this facet corresponds to valueCount - the number of values this facet matches values - an array of values matching this facet, with name and count each.
In addition, when asking for facets for arbitrary predicates there is two additional fields:
predicate - the full URI of the predicate this facet corresponds to type - the type of the facet values, currently only literal, uri and integer are supported
Note that you can ask for facets for solr fields like "tags", in this case the above two fields will be not be present as the "tags" solr field corresponds to a mix of different predicates and possibly different types.
Here is an example of a facet for dcat:keyword: { name: "metadata.predicate.literal_s.a6424133", predicate: "http://www.w3.org/ns/dcat#keyword", type: "literal", valueCount: 3, values: [ {name: "elektrictet", count: 1}, {name: "finans", count: 1}, {name: "skatt", count: 1} ] }
- Source:
Returns:
never null or undefined, may be an array of length 0 though.
- Type
- Array
getQuery() → {Object}
- Description:
the query instance, e.g. an instance of SolrQuery, associated with this SearchList.
- Source:
Returns:
- Type
- Object
(async) removeEntry(entry) → {Promise.<SearchList>}
- Description:
Remove an entry from the current search (result) list. This can cause a request for the next page load in order to maintain a consistent number of entries in memory (or rather in a front-end view) Utilizes the this._sortedChildren of the {@see List} for the actual entries in memory.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
entry |
Entry |
Returns:
- Type
- Promise.<SearchList>