SearchNetworkNode class

SearchNetworkNode class

Represents a search network node that can contain services such as extractor, indexer, searcher, and shard.

The SearchNetworkNode type exposes the following members:

Methods

Method Description
configure_all_nodes Configures all nodes in the search network.
configure_node Configures the specified node in the search network.
create_master_node Creates a master node of the search network.
create_slave_node Creates a slave node of the search network.
create_slave_node Creates a slave node of the search network.
dispose Releases all resources used by the SearchNetworkNode.
get_node_index Returns the index of the node where the service is located.
get_shard_indices Retrieves an array of all shard indices in the search network.
set_ocr_connector Sets an OCR connector that is used for OCR processing.
set_word_forms_provider Sets a word forms provider.
start Starts the functioning of the search network node.

Properties

Property Description
custom_extractors The custom extractor collection.
events The event hub for subscribing to events.
indexer The indexer.
node_index The index of the search network node.
searcher The searcher.

Example

from groupdocs.search.scaling import SearchNetworkNode
from groupdocs.search.scaling.configuring import Configuration, TcpSettings
from groupdocs.search.common import FileLogger

base_path = "./SearchNetwork/"
base_port = 49100

# Create and start the master node
master = SearchNetworkNode.create_master_node(
    0,
    base_path + "Node0",
    TcpSettings(base_port, 3000, 3000, 3000, 1000),
    FileLogger(base_path + "Log.txt", 4.0),
    Configuration.load(base_path + "Configuration.xml")
)
master.configure_all_nodes()
master.start()

# Stop the node when done
input("Press Enter to stop the master node\n")
master.dispose()

See Also