create_slave_node method
Leave feedback
On this page
Creates a slave node of the search network.
def create_slave_node(cls, node_index, storage_path, network_settings):
...
| Parameter | Type | Description |
|---|---|---|
| node_index | int |
The node index. |
| storage_path | str |
The storage path. |
| network_settings | INetworkSettings |
The network settings. |
Returns: SearchNetworkNode: The slave node.
from groupdocs.search.scaling import SearchNetworkNode
from groupdocs.search.scaling.configuring import TcpSettings
node = SearchNetworkNode.create_slave_node(
1,
"./SearchNetwork/Node1",
TcpSettings(49101, 3000, 3000, 3000, 1000)
)
Creates a slave node of the search network.
def create_slave_node(cls, node_index, storage_path, network_settings, logger):
...
| Parameter | Type | Description |
|---|---|---|
| node_index | int |
The node index. |
| storage_path | str |
The storage path. |
| network_settings | INetworkSettings |
The network settings. |
| logger | ILogger |
The logger. |
Returns: SearchNetworkNode: The slave node.
from groupdocs.search.common import FileLogger
from groupdocs.search.scaling import SearchNetworkNode
from groupdocs.search.scaling.configuring import TcpSettings
base_path = "./SearchNetwork/"
base_port = 49100
# The port and timeouts (in milliseconds) of the node, which must match the configuration
node = SearchNetworkNode.create_slave_node(
1,
base_path + "Node1",
TcpSettings(base_port + 1, 3000, 3000, 3000, 1000),
FileLogger(base_path + "Node1.log", 4.0))
node.start()
These names call create_slave_node too, limited to the overloads listed.
| Alias | Accepts |
|---|---|
create_slave_node_int32 |
create_slave_node_int32(node_index, storage_path, network_settings, logger)create_slave_node_int32(node_index, storage_path, network_settings) |
create_slave_node_file |
create_slave_node_file(node_index, storage_path, network_settings, logger)create_slave_node_file(node_index, storage_path, network_settings) |
create_slave_node_string |
create_slave_node_string(node_index, storage_path, network_settings, logger)create_slave_node_string(node_index, storage_path, network_settings) |
- class
SearchNetworkNode
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.