OpenSearch connectivity is provided by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/amitsaxena098/OpenKnowledgeStream/llms.txt
Use this file to discover all available pages before exploring further.
OpensearchConfig Spring @Configuration class in the opensearch-wiki-indexer module. It constructs an OpenSearchClient bean that is injected into OpensearchIndexer, which handles all document writes. No Spring Boot auto-configuration is used — the client is built by hand using the opensearch-java 2.19.0 SDK.
Connection
The hostname or IP address of the OpenSearch node. Passed as the first argument to
new HttpHost(...) in RestClient.builder().The HTTP port on which OpenSearch is listening. Passed as the second argument to
new HttpHost(...). OpenSearch defaults to 9200.The transport layer wrapping the low-level
RestClient. RestClientTransport serializes and deserializes JSON using JacksonJsonpMapper.The JSON mapper used by
RestClientTransport to convert between Java objects and the OpenSearch wire format. Backed by Jackson ObjectMapper.OpensearchConfig.java
Index
Documents are written byOpensearchIndexer.index(), which uses the OpenSearchClient bean provided by OpensearchConfig.
The OpenSearch index into which
Change documents are written. The index name is hardcoded in OpensearchIndexer as "wiki-changes". OpenSearch will create the index automatically on the first write if it does not already exist.Each document is keyed by the
title field of the Change model (i.e., .id(change.getTitle())). This means subsequent changes to the same Wikipedia page title will overwrite the existing document, acting as an upsert.OpensearchIndexer.java
Changing the host or port
To connect to a different OpenSearch instance, edit theHttpHost constructor call in OpensearchConfig.java:
OpensearchConfig.java — custom host example
"opensearch.example.com" and 9200 with the hostname and port of your OpenSearch node.