Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pureinsights Discovery Platform exposes a REST API that can be used by the UI components and can be called directly to configure and access Elasticsearch OpenSearch features.

Likewise, the Admin API, the Discovery API can be configured to follow steps, described as processors, within an endpoint defined by the user.

...

Post

Post requests to a given Elasticsearch instance.

Configuration:
{
    "component": "post",
    "description": "post processor",
    <configuration>
}

...

(Optional, Basic Credentials) JSON containing username and password for basic authentication on a Elasticsearch the given instance.

Elastic

Post requests to a given Elasticsearch instance using the official Java API (High level REST client).

...

{
     "servers": List<ConnectionInfo>,
     "auth": AuthenticationCredentials,
     "scroll": {
         "size": Integer,
         "timeout": Duration
     }
}

      servers (ConnectionInfo array) The search engine servers

      auth (AuthenticationCredentials) The search engine authentication

      scroll (Scroll) The configuration for scrolls when querying

OpenSearch Manual Pre-Requisites

On the resources folder of this repository, the opensearch folder contains the necessary templates to properly use OpenSearch with other discovery components.

Featured Snippets

Execute mappings found in fs-mappings.json

 curl -H 'Content-Type: application/json' -X PUT 'http://<host>:<port>/_index_template/featured_snippets' --data-binary "@fs-mappings.json"
Frequently Asked Questions

Execute mappings found in faq-mappings.json

 curl -H 'Content-Type: application/json' -X PUT 'http://<host>:<port>/_index_template/frequently_asked_questions'  }
}

      servers (ConnectionInfo array) The search engine servers

      auth (AuthenticationCredentials) The search engine authentication

      scroll (Scroll) The configuration for scrolls when querying

--data-binary "@faq-mappings.json"

Script

Run scripts as part of the search query sent to the Discovery API.

...

     type (String) The search engine type (Elastic/Open/Solr for instance). Currently, only elastic is supported

...

matchesField (HashMap) These are the fields which are going to be added in the should match template. The key is the field where the value (String or Array) will be added into the template.

...

Featured Snippets

This component calls the DistilBERT service with a question and a list of text chunks.

...

(String) Path where the id is located in the ES/OS hit.

textField

(String) Path where the text is located in the ES/OS hit.

metadataField (JsonNode, optional) Paths of extra data to extract in the ES/OS hit. for example

{
  "metadataField": {
    "uri": "_source.uri",
    ...
  }
}

...