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:fromSearchService
stage.
The following searchService:* stage types are available for use in analysis request JSONs:
-
searchService:solr -
Connects to an Apache Solr instance to translate queries into document identifiers.
searchService:reference-
References a
searchService:*component defined in the request or in the project's default components.
searchService: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).
localIdField
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
Password for HTTP Basic Authentication. Required if username is set.
solrIdField
The name of the field in Solr that contains document identifiers. Defaults to
id.
solrUrl
The base URL of the Solr core to query, for example
http://localhost:8983/solr/mycore.
username
Username for HTTP Basic Authentication. Optional.
Consumers of searchService:*
The following stages and components take searchService:* as
input:
| Stage or component | Property |
|---|---|
documents:fromSearchService | searchService |