#
Solr
The Solr plugin provides functionality relating to the Apache Solr search engine.
#
Dependency Information
<dependency>
<groupId>com.k-int.rosetta</groupId>
<artifactId>rosetta-plugin-solr</artifactId>
<version>3.0.0</version>
</dependency>
#
Providers
#
solr
Entity Kind: Provider
Type: solr
Request Model: GenericSearchRequest
Result Model: object
The solr
Provider allows Rosetta to communicate with a Solr index. It accepts a GenericSearchRequest
whose fields are interpreted as follows in order to form the Solr query:
ids
: For each item in theids
array and each entry in the Provider propertysearch_config.id_fields
, a field sub-query of the form{id_field}:{id_value}^{id_boost}
is constructed whereid_field
andid_boost
are the key and value of thesearch_config.id_fields
entry, respectively, andid_value
is the item of theids
array.The sub-queries are then combined into the root query (along with those generated by the
queries
request parameter) using Boolean OR operations between each field sub-query.queries
: For each item in thequeries
array and each entry in the Provider propertysearch_config.search_fields
, a field sub-query of the form{field}:{query}^{boost}
is constructed wherefield
andboost
are the key and value of thesearch_config.search_fields
entry, respectively, andquery
is the item of thequeries
array.The sub-queries are then combined into the root query (along with those generated by the
ids
request parameter) using Boolean OR operations between each field sub-query.
Facet fields can be populated using the search_config.facet_fields
Provider property.
The Solr request is performed against the configured Solr instance and each result is registered as a separate result
in the provider response, and any facet fields are used to populate the aggregations
provider field as an array of
Aggregation objects.
#
Properties
#
Example
name: my-provider
type: solr
properties:
protocol: http
host: localhost
port: 8983
base_uri: solr
core: main
client_timeout: 3000
request_timeout: 3000
search_config:
id_fields:
identifier: 0.0
search_fields:
summaryTitleText: 0.0
facet_fields:
- data_type