Ontotext Platform logo 3.6
  • Overview
  • Semantic Objects Service
  • Semantic Objects Search
    • Overview
    • Data Indexing
    • Quick Start
    • GraphQL API
    • Security
    • Tutorials
      • Queries
      • Paging
      • Sorting
      • Aggregations
    • Monitoring
      • Health Checks
      • Good to Go
      • Troubleshooting
      • About
    • Administration
      • Schema Management API
      • Service Configurations
      • Health Checks Configurations
      • Semantic Objects Service Configuration
  • Semantic Object Modeling
  • Workbench
  • GraphQL Federation
  • Authentication and Authorization
  • Platform Gateway
  • GraphDB
  • Installation
  • Monitoring
  • Tutorials
  • Release Notes
  • Migration Guide
  • FAQ
  • Dependencies & License
  • Support

  • Previous versions
    • Ontotext Platform 3.4
    • Ontotext Platform 3.3
    • Ontotext Platform 3.2
    • Ontotext Platform 3.1
    • Ontotext Platform 3.0

Semantic Objects Search¶

What’s in this document?

  • Overview
  • Data Indexing
  • Quick Start
  • GraphQL API
  • Security
  • Tutorials
    • Queries
    • Paging
    • Sorting
    • Aggregations
  • Monitoring
    • Health Checks
    • Good to Go
    • Troubleshooting
    • About
  • Administration
    • Schema Management API
    • Service Configurations
    • Health Checks Configurations
    • Semantic Objects Service Configuration

Overview¶

The Semantic Objects Search provides a way to index the data from the Semantic Objects Service in Elasticsearch and run queries against it. The Semantic Objects Search consists of two services: the Semantic Objects Search Service and the Semantic Objects Service.

The Semantic Objects Service is responsible for indexing the data. On SOML bind action, the Semantic Objects Service will create Elasticsearch Connector instances in GraphDB. These Connectors will ensure that the data from GraphDB is always indexed and up-to-date in Elasticsearch.

The Semantic Objects Search Service, on the other hand, provides a GraphQL endpoint over the data in Elasticsearch, allowing easy data consuming. To make a SOML schema searchable via the Search Service, the SOML schema should be first uploaded and bound in the Semantic Objects Service. After that, the schema should be simply bound to the Search Service, which will read it from the Semantic Objects Service SOML storage. The Search Service will assume that all data is already present in Elasticsearch.

See the SOML Search documentation for information on how to configure a SOML schema for the Search Service.

Data Indexing¶

During data indexing, the following happens:

  1. Semantic Objects Service removes any old GraphDB Elasticsearch Connectors (if such are left from previous indexing tasks).
  2. Semantic Objects Service creates new GraphDB Elasticsearch Connectors.
  3. GraphDB performs the indexing to Elasticsearch.

The data indexing process is triggered when:

  • A new SOML schema is being bound. Calling a bind action on an already bound SOML schema does not trigger data indexing.
  • The already bound SOML schema is being updated.

Note

Each update on the bound schema will trigger a data indexing task, which, depending on the data, may be quite time-consuming. Proceed with caution when updating a SOML schema.

The Semantic Objects Service may also trigger deletion of the Elasticsearch GraphDB Connectors, resulting in deletion of the Elasticsearch indexes. This is performed when:

  • A SOML schema is being unbound (you have called a bind action on another schema).
  • A SOML schema is being deleted.

Both of these actions will remove only the indexes associated with the given SOML schema. All other GraphDB Connector instances and Elasticsearch indexes will not be affected.

It should also be noted that setting elasticsearch.indexingEnabled to false will not trigger deletion of the indexes. So if you have big indexes and plan a lot of SOML updates, a possible solution to avoid rebuilding the Elasticsearch indexes in each update would be to disable the Elasticsearch indexing in the Semantic Objects Service. GraphDB will continue to update the existing Elasticsearch indexes so the data would be up-to-date.

However, any changes in the SOML model would not be applied. Long-term, this is not advisable as the Semantic Search Service may start using a data model that does not correspond to the indexed data, and this may result in various unexpected problems.

Quick Start¶

To deploy the Platform with the Semantic Search Service, you need to download this docker-compose.yaml example that starts the Semantic Search Service along with Semantic Objects Services (Semantic Objects, Workbench, GraphDB, and MongoDB), Elasticsearch, and Kibana.

Once you have downloaded the compose file, follow the Quick Start guide using this file instead of the one defined in the guide. (Skip the download operation in the Docker Compose section of the guide.)

After deploying the Platform, the Search Service will be available at http://localhost:9980.

To configure the Semantic Search Service, use the declarative Platform schema and its configuration options.

GraphQL API¶

The primary API of the Search Service is the /graphql REST endpoint. It exposes a GraphQL schema based on the searchable shapes and properties of a bound SOML schema.

The GraphQL schema is tailored to be as close as possible to the Elasticsearch DSL, including queries, sorting, and aggregations.

The /graphql endpoint is available for both GET and POST method requests.

GET request example for query query all_humans { human_search { hits { human { id } } } }:

curl --location -X GET \
  -H 'Content-Type: application/graphql' \
  'http://localhost:9980/graphql?query=query%20all_humans%20%7B%20human_search%20%7B%20hits%20%7B%20human%20%7B%20id%20%7D%20%7D%20%7D%20%7D'

POST request example for raw query query all_humans { human_search { hits { human { id } } } }:

curl --location -X POST \
  -H 'Content-Type: application/graphql' \
  --data 'query all_humans { human_search { hits { human { id } } } }' \
  'http://localhost:9980/graphql'

POST request example for query query all_humans { human_search { hits { human { id } } } } as JSON payload:

curl --location -X POST \
  -H 'Content-Type: application/json' \
  --data '{"operationName": "all_humans", "query": "query all_humans { human_search { hits { human { id } } } }"}' \
  'http://localhost:9980/graphql'

Security¶

The security part of the Search Service works and is implemented in the same way as the security of the Semantic Objects Service. To enable the security of the service, you need to use two configurations:

  • security.enabled: enables/disables the functionality
  • security.secret: provides a public signing key that can be used to decode JSON Web Tokens (JWT)

Important

When configuring the secrets for the different services, make sure that the SOaaS and the Search Service have the same secret when the Platform Workbench is included in the deployment.

When Search security is enabled, all requests that are made to it must include a valid JWT passed as Authorization: Bearer <token> header. Requests that do not follow this rule will be rejected with response status Unauthorized 401. A valid JWT can be acquired from FusionAuth after executing a request to the exposed REST endpoint /api/login with user credentials.

For more information about the authentication and authorization processes, see Authentication and Authorization.

Warning

The RBAC part of the security of the Search Service is not implemented for the 3.5 version of the Platform, which means that the results from the search queries will not be filtered based on the client roles. This functionality will be implemented in future releases.

The public resources that are accessible without providing a token are the /__health, /__gtg, /__trouble, and /__about endpoints.

Tutorials¶

Queries¶

Search Query Tutorial

Paging¶

Search Paging Tutorial

Sorting¶

Search Sorting Tutorial

Aggregations¶

Search Aggregations Tutorial

Monitoring¶

The Search Service has built-in monitoring allowing you to track the execution of queries and administrative tasks. Health checks for the constituent services of the Search are also available. Additionally, the service also has a good-to-go endpoint that offers a quick view of the overall health status of the system. All requests are associated with one or more logging messages, making it easier to keep track of its state.

Health Checks¶

The health checks can be obtained from the __health endpoint. The health check service also has a cache that refreshes when a certain number of seconds have passed from the last time it was requested (default is 30). The default can be changed by setting the health.cache.invalidation.period configuration parameter. The usage of the cache can also be controlled at runtime by using the boolean URL parameter cache. The default behavior or requests without additional parameters will use the cache.

There are two distinct health checks associated with the Search Service:

  • Search health check: Verifies that each dependent component required for the proper execution of the search request is available and in operational state. It checks whether there is a bound SOML schema and whether there is a connection to the Elasticsearch.
  • Elasticsearch indexes health check: Validates that all of the indexes are available and operating normally. It also performs a connection test to Elasticsearch and uses the cluster health request from Elasticsearch to calculate the overall state of the indexes. The specific case for this check is that it will return OK status if Elasticsearch is used with single node (replicas), although Elasticsearch does not recommend such usage.

Each of the described checks has a detailed response. The responses contain the following items:

  • id: The ID is obtained from a set of standard Ontotext IDs which are unique and persistent across the service. All checks are prefixed with 2 to indicate Search Service related problems.
    • Search OK - 2000: There is no issue with the service that handles search requests.
    • Search unavailable - 2001: The Search service is unavailable and cannot process any search requests.
    • SOML not bound - 2002: There is no SOML schema bound to the service.
    • SOML unavailable - 2003: The bound SOML schema could not be loaded for the store. Either the Search could not establish connection to the store or the model was removed from the store.
    • Elastic unavailable - 2004: The Search does not have connection to Elasticsearch.
    • Indexes OK - 2100: There is no issue with the required Elasticsearch indexes, and all of them are available.
    • Remote Elastic unavailable - 2101: The remote Elasticsearch instance is not available and the status of the indexes could not be retrieved.
    • Indexes unavailable - 2102: There was an internal error during the health check procedure. It shows that the service is not available and there are issues with it.
    • Index SOML not bound - 2103: There is no SOML schema bound to the service, thus there are no indexes to check for.
    • Indexes SOML unavailable - 2104: The bound SOML schema could not be loaded, therefore the required indexes could not retrieved for a correct health check.
    • Indexes errors - 2105: There is an issue with one or more indexes and their individual status is not OK.
    • Missing indexes - 2106: There is at least one required index that is missing in Elasticsearch. This may occur when the index was not created or was removed from Elasticsearch for some reason.
  • status: Marks the status of the particular component. Can be ERROR or OK. This parameter should be analyzed together with the impact status for the given health check.
  • severity: Marks the impact of the errors in a given component on the entire system. Can be LOW, `MEDIUM`, or HIGH. LOW severity is returned when there are issues that should not affect the overall behavior of the Search seriously. MEDIUM is returned when the error will lead to issues with other services but not to an unrecoverable state. HIGH severity errors mean that the Search is unusable until they are resolved. Is only returned if a dependent component is not OK.
  • name: A human-friendly name for the check. It can be inferred from the check ID as well.
  • type: A human-friendly identifier for the check. It can be either search or elasticIndexes.
  • impact: A human-friendly short description of the error, providing a quick reference for how the problem will impact the service.
  • description: A description of the check itself and what it covers.
  • troubleshooting: Contains a link to the troubleshooting documentation that offers specific steps to help users fix the problem. If there is no problem, it points to the general __trouble page.

The health checks update dynamically with the state of the overall system. When a given component recovers, its health check will also return to OK.

Beside the described health checks, each request to the __health endpoint returns an overall status field, detailing the state of the system. This is OK if no errors are present, WARNING if errors are present but their impact is not `HIGH`, and ERROR if errors are present and their impact is HIGH.

This is an example of a healthy Search instance:

{
  "status":"OK",
  "healthChecks":[
    {
      "status":"OK",
      "id":"2000",
      "name":"Search service health",
      "type":"search",
      "impact":"Search service operating normally.",
      "troubleshooting":"http://otp-search.com/__trouble",
      "description":"Search service checks.",
      "message":"Search service operating normally."
    },
    {
      "status":"OK",
      "id":"2100",
      "name":"Elastic indexes health",
      "type":"elasticIndexes",
      "impact":"All indexes are available",
      "troubleshooting":"http://otp-search.com/__trouble",
      "description":"",
      "message":"All indexes are available"
    }
  ]
}

Good to Go¶

The good-to-go endpoint is available at __gtg. The endpoint service also has a cache that refreshes if 30 seconds have passed from the last time it was requested. This is controlled by the boolean URL parameter cache. This parameter also controls whether or not to perform a full health check or to use the health check cache.

The good-to-go endpoint returns OK if the Search is operational and can be used, i.e., the status of the health checks is either OK, or it is WARNING and can be recovered to OK without Search instance restart. The endpoint returns `ERROR` when the status of the health checks is ERROR.

Good-to-go and health checks can be used in tandem in order to enable an orchestration tool for managing the Search Service. Below is a sample Kubernetes configuration for the Search that showcases how to utilize good-to-go and health check to monitor the status of your application:

spec:
  containers:
  - name: OTP Search
    image: ontotext/search
    readinessProbe:
      httpGet:
        path: /__gtg?cache=false
        port: 8080
      initialDelaySeconds: 3
      periodSeconds: 10
    livenessProbe:
      httpGet:
        path: /__health
        port: 8080
      initialDelaySeconds: 30
      periodSeconds: 30

Tip

We recommend a health check period of at least 10 seconds if not using the cache.

Another good practice is to not set a cache=false if a health check has a period greater than the cache invalidation period. The assumption made here is that the cache will be invalidated anyway, or, if it is not, that another tool using the health checks has refreshed it in the meantime.

This is an example of a Search instance that is good to go:

{
  "gtg": "OK"
}

Troubleshooting¶

The __trouble endpoint helps troubleshoot and analyze issues with the Search Service, outlining common error modes and their resolution. The troubleshooting documentation contains the following components:

  • Important endpoints: An overview of the endpoints supported by the service.
  • Example query requests: Provides a streamlined example of using the Search Service.
  • Prerequisites: Lists the skill set that a successful maintainer should have.
  • Resolving known issues: Provides a list of known symptoms together with potential causes and suggested resolution methods.

The troubleshooting endpoint is a starting point for analyzing any issues with the Search Service and may often be sufficient for resolving them on its own. If you cannot resolve the issues with the help of this endpoint, please refer to our support.

About¶

The __about endpoint lists the Search version, its build date, a quick description on what the Search Service is, and a link to this documentation.

Administration¶

Schema Management API¶

Binding a schema

The PUT /soml/{schema-id}/search endpoint is used to bind a SOML schema.

Example binding for swapi SOML schema using a cURL request:

curl --location -X PUT 'http://localhost:9980/soml/swapi/search'

Unbinding a schema

The DELETE /soml/{schema-id}/search endpoint is used to unbind a SOML schema.

Example unbinding for swapi SOML schema using a cURL request:

curl --location -X DELETE 'http://localhost:9980/soml/swapi/search'

Validating a schema

The POST /soml/validate endpoint is used to validate a SOML schema provided with the request body. The response is returned in JSON-LD format. If there were errors during validation, they will be returned with the response along with the original schema.

Example validation for SOML schema using a cURL request:

curl "http://localhost:9980/soml/validate" -X POST -H "Content-Type: text/yaml" -T "/path/to/schema.yaml"

Index information

The GET /soml/info endpoint is used to return information about existing indexes in Elasticsearch. This endpoint works only if there is a bound schema.

Example cURL request:

curl --location -X GET 'http://localhost:9980/soml/info'

Service Configurations¶

search.storage.location
Description: Specifies the location where the service will store data related to the active schema. Usually, this is a configuration properties file.
Default value: data
spring.elasticsearch.rest.uris
Description: Specifies the addresses of Elasticsearch instances to connect to. A comma-separated list.
Default value: http://localhost:9200
application.name
Description: Specifies the service name. It must be unique among the deployed Platform services. If two or more service instances have the same name (horizontal scaling), they will use the same bound schema. If not defined, the value of spring.application.name will be used if defined.
Default value: none
Note: The configuration is required when soml.storage.provider is set to rdf4j (default). The provided Docker Compose files and Helm charts have example names.
application.scheme
Description: Defines the access HTTP schema to the service. Used to build an access URL using the application.address or the default network address.
Default value: http
Possible values: http or https
application.address
Description: Specifies the service network address. Can be an IP address or a domain name. If the address does not include a port, the one configured in application.port will be added. If the address does not include an HTTP schema, the one defined in application.scheme will be used.
Default value: none
application.port
Description: Specifies the bind port of the application. If not defined, the server.port will be used. If it is not defined either, the Spring default 8080 will be used.
Default value: 8080
application.useNetworkAddressAsName
Description: Specifies if the network address should be used as application.name.
Default value: false
Possible values: true or false
Note: If enabled on an environment without stable network identifiers, some functionalities may not work properly, e.g., the service may lose its bound schema.
task.default.retry.maxRetries
Description: Specifies the number of attempts the service should make to complete the startup procedures.
This is valid only in case of network or dependency problems.
Default value: 60
task.default.retry.initialDelay
Description: Specifies the initial delay (in milliseconds) that the service should make before retrying to execute the startup procedures.
This is valid only in case of network or dependency problems. If the value is less than or equal to 0, the component will not wait.
Default value: 0
task.default.retry.delay
Description: Specifies the delay (in milliseconds) that the service should make before retrying to execute the startup procedures.
This is valid only in case of network or dependency problems. If the value is less than or equal to 0, the component will not wait between retries.
Default value: 10000
soml.storage.provider
Description: Specifies the storage provider to be used for SOML schema management.
Default value: rdf4j
Possible values:
rdf4j: RDF4J-compatible repository. Configurations applicable for this mode are prefixed with soml.storage.rdf4j.
mongodb: MongoDB-based repository. Configurations applicable for this mode are prefixed with soml.storage.mongodb.
in-memory: Transient, in-memory based repository. After service restart, the internal state is lost and needs to be reinitialized.
soml.storage.rdf4j.address
Description: Specifies the address of the RDF4J-compatible server to be used by Search Service to access the stored SOML schemas. If multi-master topology is used, multiple addresses can be configured for the corresponding masters in the cluster deployment, comma- or semicolon-separated.

Note

In case of multi-master topology, we recommend that the main master is first in the list of addresses. See more about GraphDB Cluster Mode.

soml.storage.rdf4j.repository
Description: The name of the repository to be used for schema management.
Default value: otp-system

Note

If the configured repository does not exist, the Semantic Objects will try to create it unless disabled by soml.storage.rdf4j.autoCreateRepository.

Also, note that the provided Helm charts include provisioning of the system repository with the default name.

soml.storage.rdf4j.username
Description: Specifies the username to be used for authentication in GraphDB.
soml.storage.rdf4j.credentials
Description: Specifies the credentials to be used for authentication in GraphDB.
soml.storage.rdf4j.maxConcurrentConnections
Description: Specifies the maximum HTTP connections per route to a single GraphDB instance.
Default value: 500
soml.storage.rdf4j.connectionRequestTimeout
Description: Specifies the timeout (in milliseconds) used when requesting a connection from the connection manager. A timeout value of 0 is interpreted as an infinite timeout.
Default value: 10000
soml.storage.rdf4j.connectTimeout
Description: Specifies the timeout (in milliseconds) until a connection is established. A timeout value of 0 is interpreted as an infinite timeout.
Default value: 10000
soml.storage.rdf4j.socketTimeout
Description: Specifies the socket timeout (in milliseconds), which is the timeout for waiting for data.
This also controls how long to wait for a query to retrieve results from the database.
A timeout value of 0 is interpreted as an infinite timeout.
Default value: 0
soml.storage.rdf4j.retryHttpCodes
Description: Specifies on which HTTP codes to retry the request. Supports a list of HTTP codes or ranges, comma- or semicolon-separated.
The code range can be defined in the form of 5xx (500-599) or 50x (500-509). Example: 404, 5xx
Default value: 503
soml.storage.rdf4j.maxRetries
Description: Specifies the number of request retries in case of service unavailability. Setting this to 0 will disable retries entirely.
Retrying will occur only if the HTTP response code matches the one defined in retryHttpCodes.
Default value: 1
soml.storage.rdf4j.retryInterval
Description: Specifies how long to wait before trying another request (in milliseconds) in case of service unavailability.
Default value: 2000
soml.storage.rdf4j.healthCheckTimeout
Description: Allows overriding the connectionRequestTimeout, connectTimeout, and socketTimeout configurations during the health check requests.
Default value: 5000
soml.storage.rdf4j.cluster.unavailableReadTimeout
Description: Specifies how long (in milliseconds) to wait for a query to evaluate without errors before failing it. In other words, this is the maximum time a request can take in case of communication problems.
The configuration overrides the -Dtimeout.read.request parameter of the GraphDB Client Failover Utility.
Default value: 60000
soml.storage.rdf4j.cluster.unavailableWriteTimeout
Description: Specifies how long (in milliseconds), to wait for an update to evaluate without errors before failing it. In other words, this is the maximum time a request can take in case of communication problems.
The configuration overrides the -Dtimeout.write.request parameter of the GraphDB Client Failover Utility.
Default value: 60000
soml.storage.rdf4j.cluster.scanFailedInterval
Description: Specifies how often (in milliseconds) to check for the master’s availability.
The configuration overrides the -Dscan.failed.interval parameter of the GraphDB Client Failover Utility.
Default value: 15000
soml.storage.rdf4j.cluster.retryOnHttp4xx
Description: Specifies if requests should be retried on HTTP 4xx (e.g., 404: Not found in case of missing repository).
The configuration overrides the -Dretry-on-4xx parameter of the GraphDB Client Failover Utility.
Default value: true
soml.storage.rdf4j.cluster.retryOnHttp5xx
Description: Specifies if requests should be retried on HTTP 5xx (e.g., 503: Unavailable in case the master cannot handle requests at the moment)
The configuration overrides the -Dretry-on-503 parameter of the GraphDB Client Failover Utility.
Default value: true
soml.storage.rdf4j.cluster.forceClusterClient
Description: Enables the use of the GraphDB Client Failover Utility.
Default value: false

Note

Enabled by default if multiple addresses are defined in soml.storage.rdf4j.address.

sparql.endpoint.cluster.forceConnection
Description: Specifies if a remote connection should be established even if the remote repository does not exist. Consequent requests will be retried until a repository is present or within the configured timeouts.
If disabled, the requests will fail immediately until the configured repository is created.
Default value: false

Note

Applicable only if the GraphDB Client Failover Utility is enabled.

Warning

If enabled, this will disable the automatic repository creation.

soml.storage.rdf4j.autoCreateRepository
Description: Enables or disables the automatic repository creation. If the configured repository already exists, this configuration will not have any effect.
Default value: true

Note

The application will try the following steps in order to create a repository on the configured endpoint address:

  1. A repository with provided custom configuration via soml.storage.rdf4j.repositoryConfig.
  2. A GraphDB cluster worker repository (for GraphDB Standard and Enterprise deployments).
  3. A GraphDB Free repository instance (for GraphDB Free deployment).
  4. Generic Sail in-memory repository as a last option.

Note

Steps 2 to 4 are skipped if soml.storage.rdf4j.repositoryConfig is set. They can be enabled by explicitly setting the soml.storage.rdf4j.disableDefault to false.

soml.storage.rdf4j.repositoryConfig
Description: Allows а custom user-provided repository template from the local file system.
The repository name must match the one defined in soml.storage.rdf4j.repository, or can be defined as "%id%" and will be automatically filled during the create process.
soml.storage.rdf4j.disableDefault
Description: Allows the disabling of the internal default templates. Will fail if the user-provided template does not succeed.
Default value:
False if soml.storage.rdf4j.repositoryConfig is not provided.
True if soml.storage.rdf4j.repositoryConfig is provided.

Note

These defaults do not apply if this configuration has an explicitly set value.

Warning

In Ontotext Platform version 3.5 MongoDB is deprecated and will be removed in a future version.

search.soml.storage.mongodb.endpoint
Description: Specifies the address of the MongoDB storage where the SOML documents are stored.
Default value: mongodb://localhost:27017
search.soml.storage.mongodb.database
Description: Specifies the database name that should be used to store the SOML documents.
Default value: soaas
search.soml.storage.mongodb.collection
Description: Specifies the collection name that should be used to store the SOML documents. MongoDB collections are analogous to tables in relational databases.
Default value: soml
search.soml.storage.mongodb.connectionTimeout
Description: The time (in milliseconds) to attempt a connection before timing out.
Default value: 5000
search.soml.storage.mongodb.readTimeout
Description: The time (in milliseconds) to attempt to read for a connection before timing out.
Default value: 5000
search.soml.storage.mongodb.readConcern
Description: The Mongo client read concern configuration. For more information, see the Mongo documentation on Read Isolation (Read Concern).
Default value: majority
Possible values: default (Mongo default), local, majority (Search Service default), linearizable, snapshot, available
search.soml.storage.mongodb.writeConcern
Description: The Mongo client write concern configuration. For more information, see the Mongo documentation on Write Acknowledgement (Write Concern).
Default value: majority
Possible values: acknowledged (Mongo default), w1, w2, w3, unacknowledged, journaled, majority (Search Service default), tag-name or in the form w=tag-name/server-number, [wtimeout=timeout]. Example: w=2, wtimeout=1000.
search.soml.storage.mongodb.applicationName
Description: Assigns an application name that will be displayed in the Mongo logs.
Default value: search
soml.storage.mongodb.serverSelectionTimeout
Description: Specifies the time (in milliseconds) to block for server selection before throwing an exception.
Default value: 5000
logging.level.com.ontotext.platform.search
Description: Specifies the console log level for the Platform Search Service.
Default value: INFO
graphdql.federation.enabled
Description: Specifies if the Search Service will be used in federation mode.
Default value: false
security.enabled
Description: Specifies whether the security part of the Search Service should be enabled. In production, this configuration should be provided as an environment variable. In development mode, it is safe to pass and use it as an application property.
Default value: true
security.secret
Description: Specifies the public signing key that can be used to decode JSON Web Tokens (JWT). Valid JWTs are required on all Search requests when security.enabled=true.

Health Checks Configurations¶

search.healthcheck.somlSeverity
Description: Allows overriding of the severity for the SOML check in the Search Service health check. The value from the configuration will be returned when there is no SOML schema in the schema store or when there is no schema bound to the service.
Default value: MEDIUM
Possible values: LOW, MEDIUM, or HIGH
search.healthcheck.elasticSeverity
Description: Allows overriding of the severity for the Elasticsearch check in the Search Service health check. The value from the configuration will be returned when the service is unable to connect to the Elasticsearch instance.
Default value: MEDIUM
Possible values: LOW, MEDIUM, or HIGH
search.healthcheck.unavailableSeverity
Description: Allows overriding of the severity for the Search Service health check. The value from the configuration will be returned when there is an internal problem with the service and the health check fails to execute successfully.
Default value: HIGH
Possible values: LOW, MEDIUM, or HIGH
indexing.healthcheck.somlSeverity
Description: Allows overriding of the severity for the SOML check in the Elasticsearch indexes service health check. The value from the configuration will be returned when there is no SOML in the schema store or when there is no schema bound to the service.
Default value: MEDIUM
Possible values: LOW, MEDIUM, or HIGH
indexing.healthcheck.indexesSeverity
Description: Allows overriding of the severity for the search indexes health check. The value from the configuration will be returned when there is a problem with some/all indexes in the Elasticsearch instance.
Default value: MEDIUM
Possible values: LOW, MEDIUM, or HIGH
indexing.healthcheck.unavailableSeverity
Description: Allows overriding of the severity for the Elasticsearch indexes service health check. The value from the configuration will be returned when the Search Service is unable to connect to the Elasticsearch instance or there is an internal problem with the service and the health check fails to execute successfully.
Default value: HIGH
Possible values: LOW, MEDIUM, or HIGH

Semantic Objects Service Configuration¶

elasticsearch.indexingEnabled
Description: Enables Elasticsearch indexing.
Default value: false
elasticsearch.host
Description: Specifies the address of the Elasticsearch instance for the Semantic Objects Service and GraphDB to connect to.
Accepts multiple hosts, comma- or semicolon-separated.
Default value: n/a
elasticsearch.externalHost
Description: Specifies the address of the Elasticsearch instance for the Semantic Objects Service to connect to. If not specified, the value of elasticsearch.host will be used. Useful only if the Semantic Objects Service and GraphDB are in different networks.
Accepts multiple hosts, comma- or semicolon-separated.
Default value: elasticsearch.host
elasticsearch.waitUntilAccessible
Description: Specifies if Semantic Objects should wait for the Elasticsearch instance to become accessible before handing any requests.
Default value: true
elasticsearch.indexCreateSettings
Description: Index settings to be used directly when creating the Elasticsearch indexes.
Default value: n/a
elasticsearch.connectorCreateSettings
Description: GraphDB Elasticsearch Connector creation parameters to be used for the Connector instances.
Default value: n/a
elasticsearch.accessTimeout
Description: A timeout (in milliseconds) to try to connect to the Elasticsearch service. The configuration controls the time to acquire a connection from the connection pool and the time to try to connect to the remote service.
Default value: 2000
Possible values:
-1 or 0: wait indefinitely.
Positive integer value
elasticsearch.healthcheckSeverity
Description: Defines the severity to be reported by the Elasticsearch health check if the service is not properly configured or accessible.
Default value: HIGH
Possible values: LOW, MEDIUM, HIGH
elasticsearch.healthCheckTimeout
Description: Defines the timeout (in milliseconds) of the requests to check if the Elasticsearch service is accessible during health check.
Default value: 3000
Possible values: Positive integer value
search.maxNestingLevel
Description: Specifies the maximum allowed value defined in search.type.nestingLevel configurations in SOML objects and property definitions.
Default value: 5
Possible values: Positive integer value
elasticsearch.ignoreMalformed
Description: Allows ignoring of malformed data when indexing in Elasticsearch. If set to false, invalid data will prevent a SOML schema from being bound.
Default value: true

With a complex SOML schema and a large amount of data, it is easy to start hitting the Elasticsearch default limits. So setting the following properties to larger values may be needed:

elasticsearch.indexCreateSettings.index.mapping.nested_objects.limit: 10000
elasticsearch.indexCreateSettings.index.mapping.nested_fields.limit: 50
elasticsearch.indexCreateSettings.index.mapping.total_fields.limit: 1000

Note

If your SOML schema creates indexes that are too big, increasing the Elasticsearch limits is not always a solution, as this will affect the performance. Reducing the index scope to only the mandatory data is always advisable.


Download documentation

  • PDF
  • ePUB

Contacts

  • Support · platform-support@ontotext.com
  • Sales · sales@ontotext.com
  • General · info@ontotext.com
  • US (toll free) · 1-866-972-6686
  • Europe · +359 2 974 61 60

More info

  • About Ontotext
  • Semantic web

Follow us

Ontotext logo
© Copyright 2021, Ontotext. Last updated on 01 December, 2021. | Privacy