store/SolrQuery

Members

modifiers :Map.<string, any>

Source:
Type:
  • Map.<string, any>

params :Map.<string, *>

Source:
Type:
  • Map.<string, *>

Methods

admin(val, modifier) → {SolrQuery}

Description:
  • Matches only entries with explicitly ACL stating user(s) has admin rights

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

all(val, modifier) → {SolrQuery}

Description:
  • Matches title, description and tags, multivalue, cannot be sorted on.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

and(structure) → {SolrQuery}

Description:
  • Provide a query in the form of an object structure where the toplevel attributes are conjunctive (AND:ed together). The following example will query for things that are typed as vedgetables OR typed as fruit AND has a title that contains the word 'orange': query.disjunctive().rdfType('ex:Vedgetable).and({ rdfType: 'ex:Fruit', title: 'Orange', });

    Note, the name of the method ('and') does not refers to how the object structure is combined with the rest of the query, only how the inner parts of the object structure is combined. In this example we have change the toplevel behaviour of the query to become disjunctive (being OR:ed together), this is to make the query more representative since there is no need for the grouping of the object structure otherwise.

Source:
Parameters:
Name Type Description
structure Object
Returns:
Type
SolrQuery

context(context, modifier) → {SolrQuery}

Description:
  • Matches only entries within specified context(s)

Source:
Parameters:
Name Type Default Description
context string | Context

either a contextId, the resourceURI for a

  • * context, a Context instance or an array containing any of those. In case of a
    
  • * string, either directly or within the array and it starts with 'http' it is assumed it is
    
  • * the resourceURI of the context, otherwise the context is assumed to be a contextId.
    
modifier true | false | string null
Returns:
Type
SolrQuery

contributors(val, modifier) → {SolrQuery}

Description:
  • Matches all contributors (in the entry information graph) expressed via their resourceURIs.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

created(val, modifier) → {SolrQuery}

Description:
  • Matches entries that are created at a specific date or in a range. Ranges must be given as strings as [2010-01-01T00:00:00Z TO *].

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

createdRange(from, to, modifier) → {SolrQuery}

Description:
  • Utility function to create a range expression for the created function.

Source:
Parameters:
Name Type Default Description
from Date

no lower range restriction if undefined or null is passed

to Date

no upper range restriction if undefined or null is passed

modifier true | false | string null
Returns:
Type
SolrQuery

creator(val, modifier) → {SolrQuery}

Description:
  • Matches all creators (in the entry information graph) expressed via their resourceURIs.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

dateProperty(predicate, object, modifier, related) → {SolrQuery}

Description:
  • Matches specific property value combinations when the value is an integer. Note that the integer values are single value per property and can be used for sorting. Ranges are allowed as strings, for instance [* TO 2010-01-01T00:00:00Z].

Source:
Parameters:
Name Type Default Description
predicate string
object string | array
modifier true | false | string
related boolean false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

datePropertyRange(predicate, from, to, modifier, related) → {SolrQuery}

Description:
  • Utility function for creating a date range for dateProperty.

Source:
Parameters:
Name Type Default Description
predicate string
from Date
to Date
modifier true | false | string
related boolean false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

description(val, modifier) → {SolrQuery}

Description:
  • Matches all descriptions in all languages, multivalued, cannot be sorted on. Includes dc:description, dcterms:description, rdfs:comment

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

disjunctive() → {SolrQuery}

Description:
  • Tell the query construction to make top level fields disjunctive rather than conjunctive. For example

    es.newSolrQuery().disjunctive().title("banana").description("tomato")
    

    Will search for entries that have either a "banana" in the title or "tomato" in the description rather than entries that have both which is the default.

Source:
Returns:
Type
SolrQuery

disjunctiveProperties() → {SolrQuery}

Description:
  • Tell the query construction to make the fields added via the property methods (uriProperty, literalProperty and integerProperty) to be disjunctive rather than conjunctive. For example:

    es.newSolrQuery().disjunctiveProperties().literalProperty("dcterms:title", "banana")
         .uriProperty("dcterms:subject", "ex:Banana");
    

    Will search for entries that have either a "banana" in the title or a relation to ex:Banana via dcterms:subject. The default, without disjunctiveProperties being called is to create a conjunction, i.e. AND them together.

Source:
Returns:
Type
SolrQuery

entryType(val, modifier) → {SolrQuery}

Description:
  • Matches entries with the given entry type, use the values in types, e.g. sq.entryType(types.ET_LINK).

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

facetLimit(limit)

Description:
  • The maximum amount of facet results to be report on. Default is 100, values up to 1000 is allowed.

Source:
Parameters:
Name Type Description
limit integer

maximum number of facet results to return per facet.

facetMinCount(limit)

Description:
  • The minimum amount of facet results to be included in the response. Default is 1.

Source:
Parameters:
Name Type Description
limit integer

minumum amount of facet results, facets with fewer results will be omitted in the response.

facetMissing(include)

Description:
  • If matches with no match against a facet should be reported as well.

Source:
Parameters:
Name Type Description
include boolean

true if they should be reported.

forEach(func) → {promise}

Source:
See:
  • {List.forEach}
Parameters:
Name Type Description
func
Returns:
Type
promise

getEntries(page) → {Promise.<Array.<Entry>>}

Source:
See:
  • {List.getEntries}
Parameters:
Name Type Description
page
Returns:

the promise will return an entry-array.

Type
Promise.<Array.<Entry>>

(async) getEntry() → {Promise.<Entry>}

Description:
  • Finds a single entry for the current query (sets the limit to 1).

Source:
Returns:
Type
Promise.<Entry>

getLimit() → {string|number}

Description:
  • Gets the pagination limit if it set.

Source:
Returns:
Type
string | number

(protected) getQuery() → {string}

Description:
  • Produces the actual query to the EntryStore API.

Source:
Returns:
Type
string

graphType(val, modifier) → {SolrQuery}

Description:
  • Matches entries with the given graph type, use the values in types, e.g. sq.entryType(types.GT_USER).

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

integerFacet(predicate, relatedopt) → {SolrQuery}

Description:
  • Request to include integer facets for the given predicate

Source:
Parameters:
Name Type Attributes Default Description
predicate string
related boolean <optional>
false

whether the facet is on the related predicates, default is false

Returns:
Type
SolrQuery

integerProperty(predicate, object, modifier, related) → {SolrQuery}

Description:
  • Matches specific property value combinations when the value is an integer. Note that the integer values are single value per property and can be used for sorting. Ranges are allowed as strings, for instance [0 TO 100] or [0 TO *] for all positive integers.

Source:
Parameters:
Name Type Default Description
predicate string
object string | array
modifier true | false | string
related boolean false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

integerPropertyRange(predicate, from, to, related) → {SolrQuery}

Description:
  • Utility function for creating a integer range for integerProperty.

Source:
Parameters:
Name Type Default Description
predicate string
from string | number

if undefined no lower bound will be created, corresponds to *

to string | number

if undefined no upper bound will be created, corresponds to *

related boolean false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

lang(val, modifier) → {SolrQuery}

Description:
  • Matches the language (as a literal) of the resource, single value, can be used for sorting? Includes dc:language, dcterms:language

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

limit(limit) → {SolrQuery}

Description:
  • Sets the pagination limit.

Source:
Parameters:
Name Type Description
limit string | number
Returns:
Type
SolrQuery

list(asyncCallType) → {SearchList}

Description:
  • Construct a SearchList fro this SolrQuery.

Source:
Parameters:
Name Type Description
asyncCallType
Returns:
Type
SearchList

lists(val, modifier) → {SolrQuery}

Description:
  • Matches only entries that are part of the given lists, identified via their resourceURIs.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

literalFacet(predicate, relatedopt) → {SolrQuery}

Description:
  • Request to include literal facets for the given predicate

Source:
Parameters:
Name Type Attributes Default Description
predicate string
related boolean <optional>
false

whether the facet is on the related predicates, default is false

Returns:
Type
SolrQuery

literalProperty(predicate, object, modifier, indexTypeopt, relatedopt) → {SolrQuery}

Description:
  • Matches specific property value combinations.

Source:
Parameters:
Name Type Attributes Default Description
predicate string
object string | array
modifier true | false | string
indexType text | string <optional>
ngram

'ngram' corresponds to partial string matching, 'string' corresponds to exact string matching and 'text' corresponds to word matching.

related boolean <optional>
false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

literalPropertyRange(predicate, from, to, modifier, relatedopt) → {SolrQuery}

Description:
  • Utility function for creating a range for literalProperty.

Source:
Parameters:
Name Type Attributes Default Description
predicate string
from string
to string
modifier true | false | string
related boolean <optional>
false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

metadataRead(val, modifier) → {SolrQuery}

Description:
  • Matches only entries with explicitly ACL stating user(s) has metadata read rights

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

metadataWrite(val, modifier) → {SolrQuery}

Description:
  • Matches only entries with explicitly ACL stating user(s) has metadata write (and read) rights

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

modified(val, modifier) → {SolrQuery}

Description:
  • Matches entries that are modified at a specific date or in a range. Ranges are given as strings as [2010-01-01T00:00:00Z TO *].

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

modifiedRange(from, to, modifier) → {SolrQuery}

Description:
  • Utility function to create a range expression for the modified function.

Source:
Parameters:
Name Type Default Description
from Date

no lower range restriction if undefined or null is passed

to Date

no upper range restriction if undefined or null is passed

modifier true | false | string null
Returns:
Type
SolrQuery

objectLiteral(val, modifier) → {SolrQuery}

Description:
  • Matches all literals in object position in the metadata.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

objectUri(val, modifier) → {SolrQuery}

Description:
  • Matches all URIs in object position in the metadata.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

offset(offset) → {SolrQuery}

Description:
  • Set an explicit offset.

Source:
Parameters:
Name Type Description
offset string | number
Returns:
Type
SolrQuery

or(structure) → {SolrQuery}

Description:
  • Provide a query in the form of an object structure where the toplevel attributes are disjunctive (OR:ed together). The following example will query for things that are typed as vedgetables AND have the word 'tomato' in either the title OR description: query.rdfType('ex:Vedgetable).or({ title: 'tomato', description: 'tomato' });

    Note, the name of the method ('or') does not refers to how the object structure is combined with the rest of the query, only how the inner parts of the object structure is combined. To change the toplevel behaviour of the query from an and to an or, use the disjunctive method.

Source:
Parameters:
Name Type Description
structure Object
Returns:
Type
SolrQuery

predicate(val, modifier) → {SolrQuery}

Description:
  • Matches all URIs in predicate position in the metadata.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

profile(val, modifier) → {SolrQuery}

Description:
  • Matches the profile.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

publicRead(isPublic) → {SolrQuery}

Description:
  • Matches only public entries. Warning, individual entrys public flag is inherited from surrounding context and if the context ACL is updated the entrys are not reindexed automatically. Hence, this flag may be incorrect.

Source:
Parameters:
Name Type Default Description
isPublic true | false true
Returns:
Type
SolrQuery

rdfType(rdfType, modifier) → {SolrQuery}

Description:
  • Matches all types of the resourceURI, i.e. all URIs pointed to via rdf:type from the resourceURI.

Source:
Parameters:
Name Type Default Description
rdfType string | array
modifier true | false | string null
Returns:
Type
SolrQuery

resource(val, modifier) → {SolrQuery}

Description:
  • Matches the resourceURI of the entry.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

resourceRead(val, modifier) → {SolrQuery}

Description:
  • Matches only entries with explicitly ACL stating user(s) has resource read rights

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

resourceType(val, modifier) → {SolrQuery}

Description:
  • Matches entries with the given resource type, use the values in types, e.g. sq.entryType(types.RT_INFORMATIONRESOURCE).

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

resourceWrite(val, modifier) → {SolrQuery}

Description:
  • Matches only entries with explicitly ACL stating user(s) has resource write (and read) rights

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

(async) size() → {Promise.<number>}

Description:
  • Executes the query with limit 0 and returns the number of matches for the current query.

Source:
Returns:
Type
Promise.<number>

sort(sort) → {SolrQuery}

Description:
  • The parameter "sort" can be used for Solr-style sorting, e.g. "sort=title+asc,modified+desc". The default sorting value is to sort after the score (relevancy) and the modification date. All string and non-multi value fields can be used for sorting, this basically excludes title, description and keywords, but allows sorting after e.g. title.en. If no sort is explicitly given the default sort string used is "score+asc".

Source:
Parameters:
Name Type Description
sort String

a list of fields together with '+asc' or '+desc', first field has the highest priority when sorting.

Returns:
Type
SolrQuery

status(val, modifier) → {SolrQuery}

Description:
  • Matches entries with with specific status (expressed in entry information graph)

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

subject(val, modifier) → {SolrQuery}

Description:
  • Matches all URIs in subject position in the metadata, except the resourceURI.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

tagLiteral(val, modifier) → {SolrQuery}

Description:
  • Matches all tags literals in all languages, multivalued, cannot be sorted on. Includes dc:subject, dcterms:subject, dcat:keyword and lom:keyword

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

tagURI(val, modifier) → {SolrQuery}

Description:
  • Matches all tag URIs, multivalued, cannot be sorted on. Includes dc:subject, dcterms:subject

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

title(val, modifier) → {SolrQuery}

Description:
  • Matches all titles in all languages, multivalued, cannot be sorted on. Includes dc:title, dcterms:title, skos:prefLabel, skos:altLabel, skos:hiddenLabel, rdfs:label, foaf:name.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

titleWithLanguage(title, language) → {SolrQuery}

Description:
  • If a title has a language set, a dynamic field is created with the pattern "title.en", without multi value support. This is used in the context of sorting.

Source:
Parameters:
Name Type Description
title String

the title to search for

language String

the language of the title for instance "en".

Returns:
Type
SolrQuery

title_lang()

Source:
Deprecated:
  • Yes

uri(val, modifier) → {SolrQuery}

Description:
  • Matches the entryURI of the entry.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery

uriFacet(predicate, relatedopt) → {SolrQuery}

Description:
  • Request to include URI facets for the given predicate

Source:
Parameters:
Name Type Attributes Default Description
predicate string
related boolean <optional>
false

whether the facet is on the related predicates, default is false

Returns:
Type
SolrQuery

uriProperty(predicate, object, modifier, related) → {SolrQuery}

Description:
  • Matches specific property value combinations when the value is an uri.

Source:
Parameters:
Name Type Default Description
predicate string
object string | array
modifier true | false | string
related boolean false

will search in related properties if true, default is false

Returns:
Type
SolrQuery

username(val, modifier) → {SolrQuery}

Description:
  • Matches the username.

Source:
Parameters:
Name Type Default Description
val string | array
modifier true | false | string null
Returns:
Type
SolrQuery