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:
On each slave server, create an instance of the SearchNetworkNode class, call the start method.
On the master server, create an instance of the SearchNetworkNode class, passing the configuration object to the constructor.
The following code example demonstrates starting a master node on the server.
SearchNetworkNodenode0=newSearchNetworkNode(0,basePath+"Node0",newTcpSettings(basePort,sendTimeout,receiveTimeout),newConsoleLogger(),configuration);node0.getEvents().ConfigurationCompleted.add(newEventHandler(){@Overridepublicvoidinvoke(Objects,EventArgse){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.