Search network deployment

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Search MCP server lets your agent work with files on your machine; they are never uploaded. It runs in Docker: replace /path/to/documents with the folder it may use.

claude mcp add groupdocs-search -- docker run --rm -i -v /path/to/documents:/data ghcr.io/groupdocs-search/search-net-mcp:latest
Folders, licensing and more →

The GroupDocs.Search search network consists of one master node and several slave nodes. Each node is a hardware server with the Java platform deployed on it. Inside the Java platform, an application is deployed that creates an instance of the SearchNetworkNode class.

An instance of the SearchNetworkNode class provides the services described in the configuration:

  • Indexing service;
  • Search services;
  • Extraction services;
  • Shard services.

Indexing and search services also provide an interface to access all search network features.

To deploy the GroupDocs.Search search network, you must perform the following steps:

The following code example demonstrates starting a slave node on the server.

SearchNetworkNode node1 = new SearchNetworkNode(
    1,
    basePath + "Node1",
    new TcpSettings(basePort + 1, sendTimeout, receiveTimeout));
node1.start();

The following code example demonstrates starting a master node on the server.

SearchNetworkNode node0 = new SearchNetworkNode(
    0,
    basePath + "Node0",
    new TcpSettings(basePort, sendTimeout, receiveTimeout),
    new ConsoleLogger(),
    configuration);

node0.getEvents().ConfigurationCompleted.add(new EventHandler() {
    @Override
    public void invoke(Object s, EventArgs e) {
        System.out.println("Configuration complete");
    }
});

System.out.println();
System.out.println("Configuring the search network");
node0.configureAllNodes();

System.out.println("Launching the search network");
node0.start();

The following code example demonstrates the implementation of a simple console logger.

public class ConsoleLogger implements ILogger {
    public ConsoleLogger() {
    }

    @Override
    public void error(String message) {
        System.out.println("Error: " + message);
    }

    @Override
    public void trace(String message) {
        System.out.println(message);
    }
}

More resources

GitHub examples

You may easily run the code from documentation articles and see the features in action in our GitHub examples:

Free online document search App

Along with full featured .NET library we provide simple, but powerful free Apps.

You are welcome to search over your PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX and more with our free online Free Online Document Search App.