SearchNetworkNode

Inheritance: java.lang.Object

All Implemented Interfaces: java.io.Closeable

public class SearchNetworkNode implements Closeable

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

Constructors

Constructor Description
SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings) Initializes a new instance of the SearchNetworkNode class.
SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger) Initializes a new instance of the SearchNetworkNode class.
SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger, Configuration configuration) Initializes a new instance of the SearchNetworkNode class.

Methods

Method Description
start() Starts the functioning of the search network node.
configureAllNodes() Configures all nodes in the search network.
configureNode(int nodeIndex) Configures the specified node in the search network.
getCustomExtractors() Gets the custom extractor collection.
setOcrConnector(IOcrConnector ocrConnector) Sets an OCR connector that is used for OCR processing.
setWordFormsProvider(IWordFormsProvider wordFormsProvider) Sets a word forms provider.
close() Releases all resources used by the SearchNetworkNode .
getNodeIndex() Gets the index of the search network node.
getEvents() Gets the event hub for subscribing to events.
getIndexer() Gets the indexer.
getSearcher() Gets the searcher.
getShardIndices() Gets an array of all shard indices in the search network.
getNodeIndex(int serviceIndex) Gets the index of the node where the service is located.
getCore()

SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings)

public SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings)

Initializes a new instance of the SearchNetworkNode class.

Parameters:

Parameter Type Description
nodeIndex int The node index.
storagePath java.lang.String The storage path.
networkSettings INetworkSettings The network settings.

SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger)

public SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger)

Initializes a new instance of the SearchNetworkNode class.

Parameters:

Parameter Type Description
nodeIndex int The node index.
storagePath java.lang.String The storage path.
networkSettings INetworkSettings The network settings.
logger ILogger The logger.

SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger, Configuration configuration)

public SearchNetworkNode(int nodeIndex, String storagePath, INetworkSettings networkSettings, ILogger logger, Configuration configuration)

Initializes a new instance of the SearchNetworkNode class.

Parameters:

Parameter Type Description
nodeIndex int The node index.
storagePath java.lang.String The storage path.
networkSettings INetworkSettings The network settings.
logger ILogger The logger.
configuration Configuration The configuration.

start()

public void start()

Starts the functioning of the search network node.

configureAllNodes()

public void configureAllNodes()

Configures all nodes in the search network.

configureNode(int nodeIndex)

public void configureNode(int nodeIndex)

Configures the specified node in the search network.

Parameters:

Parameter Type Description
nodeIndex int The node index.

getCustomExtractors()

public CustomExtractorCollection getCustomExtractors()

Gets the custom extractor collection. The full example of implementing a custom extractor is presented in documentation for GroupDocs.Search.Common.IFieldExtractor interface.

Returns: CustomExtractorCollection - The custom extractor collection.

setOcrConnector(IOcrConnector ocrConnector)

public void setOcrConnector(IOcrConnector ocrConnector)

Sets an OCR connector that is used for OCR processing.

Parameters:

Parameter Type Description
ocrConnector IOcrConnector The OCR connector.

setWordFormsProvider(IWordFormsProvider wordFormsProvider)

public void setWordFormsProvider(IWordFormsProvider wordFormsProvider)

Sets a word forms provider.

Parameters:

Parameter Type Description
wordFormsProvider IWordFormsProvider The word forms provider.

close()

public void close()

Releases all resources used by the SearchNetworkNode .

getNodeIndex()

public int getNodeIndex()

Gets the index of the search network node.

Returns: int - The index of the search network node.

getEvents()

public NodeEventHub getEvents()

Gets the event hub for subscribing to events.

Returns: NodeEventHub - The event hub for subscribing to events.

getIndexer()

public Indexer getIndexer()

Gets the indexer.

Returns: Indexer - The indexer.

getSearcher()

public Searcher getSearcher()

Gets the searcher.

Returns: Searcher - The searcher.

getShardIndices()

public int[] getShardIndices()

Gets an array of all shard indices in the search network.

Returns: int[] - An array of all shard indices in the search network.

getNodeIndex(int serviceIndex)

public int getNodeIndex(int serviceIndex)

Gets the index of the node where the service is located.

Parameters:

Parameter Type Description
serviceIndex int The service index.

Returns: int - The index of the node where the service is located. If the service index is incorrect, when -1 is returned.

getCore()

public Object getCore()

Returns: java.lang.Object