searchService

Search service components act as adapters between an external search engine and the local Lingo4G index. They translate a query expressed in the external engine's syntax into a set of document identifiers that can be resolved locally. Search services are used by the documents:​from​Search​Service stage.

The following search​Service:​* stage types are available for use in analysis request JSONs:

search​Service:​solr

Connects to an Apache Solr instance to translate queries into document identifiers.


search​Service:​reference

References a search​Service:​* component defined in the request or in the project's default components.


search​Service:​solr

Connects to an Apache Solr instance, executes the provided query and retrieves matching document IDs. The IDs are then matched against a field in the local Lingo4G index (the unique document identifier field, by default).

{
  "type": "searchService:solr",
  "localIdField": null,
  "password": null,
  "solrIdField": "id",
  "solrUrl": null,
  "username": null
}

Note that missing document identifiers returned by external search service will be silently ignored (it is assumed the external search service and the local Lingo4G index are kept in sync).

local​Id​Field

Type
string
Default
null
Required
no

The name of the field in the local Lingo4G index that contains document identifiers to match against IDs returned by Solr. If not provided, defaults to the project's configured ID field.

password

Type
string
Default
null
Required
no

Password for HTTP Basic Authentication. Required if username is set.

solr​Id​Field

Type
string
Default
"id"
Required
no

The name of the field in Solr that contains document identifiers. Defaults to id.

solr​Url

Type
string
Default
null
Required
yes

The base URL of the Solr core to query, for example http:​//localhost:​8983/solr/mycore.

username

Type
string
Default
null
Required
no

Username for HTTP Basic Authentication. Optional.

Consumers of search​Service:​*

The following stages and components take search​Service:​* as input:

Stage or component Property
documents:​from​Search​Service
  • search​Service