<commit_before>#Configuration

##1. Overview

The SRCH2 engine can be customized using a configuration file in XML. This documentation describes the details of how to do this configuration.  The package includes a sample [configuration file](../example-demo/srch2-config.xml).  Each parameter in the file can have one of the following two labels: "Required" means this tag must be present in the configuration file, and "Optional" means this tag does not need to be present.  Tag names and tag attribute names (but not values) are case insensitive.

##2. Home Directory (Required)

```
 <srch2Home>/path/to/srch2/home/directory</srch2Home>
```
This parameter specifies the installation folder of the SRCH2 engine,
which includes the binary, a folder "example-demo" with a movie
example, and other files needed by the engine. Other
file paths used in the configuration should be relative to this home
path. For example, if we give the engine a data file at
"/usr/joe/srch2/example-data/movie-data.json", and the SRCH2 home
directory is set to "/usr/joe/srch2", then the configuration file
should reference the data file's location as
"example-data/movie-data.json".

##3. Hostname/Ports (Required)
```
 <listeningHostname>127.0.0.1</listeningHostname>
 <listeningPort>8081</listeningPort>
```
This parameter is the network identification (i.e., IP address or host name) of the server on which the SRCH2 engine is listening.
NOTE: If you want the server to accept all incoming packets, please use <b>0.0.0.0</b>.

The following parameters allow certain operations on different ports.  This feature allows network-based security
to be implemented using standard firewall functionality.  Typically, the "search" and "info" operations remain on a port
accessible from any IP address.  Operations such as "suggest", "docs", "update", "save", "export", and "resetLogger" are placed on a port to which access is restricted by a firewall to internal IP addresses.  An example of relocating ports is provided in
the advanced example configuration file in [example-demo/srch2-config-advanced.xml](../example-demo/srch2-config-advanced.xml).

###3.1 SearchPort (Optional)
This parameter overrides "listeningPort" for "search" requests.  "Search" requests must be sent to this port instead.

###3.2 Suggest Port (Optional)
This parameter overrides "listeningPort" for "suggest" requests.  "Suggest" requests must be sent to this port instead.

###3.3 InfoPort (Optional)
This parameter overrides "listeningPort" for "info" requests.  "Info" requests must be sent to this port instead.

###3.4 DocsPort (Optional)
This parameter overrides "listeningPort" for "docs" requests.  "Docs" requests must be sent to this port instead.
<commit_msg>recover the configuration<commit_after>#Configuration

##1. Overview

The SRCH2 engine can be customized using a configuration file in XML. This documentation describes the details of how to do this configuration.  The package includes a sample [configuration file](../example-demo/srch2-config.xml).  Each parameter in the file can have one of the following two labels: "Required" means this tag must be present in the configuration file, and "Optional" means this tag does not need to be present.  Tag names and tag attribute names (but not values) are case insensitive.

##2. Home Directory (Required)

```
 <srch2Home>/path/to/srch2/home/directory</srch2Home>
```
This parameter specifies the installation folder of the SRCH2 engine,
which includes the binary, a folder "example-demo" with a movie
example, and other files needed by the engine. Other
file paths used in the configuration should be relative to this home
path. For example, if we give the engine a data file at
"/usr/joe/srch2/example-data/movie-data.json", and the SRCH2 home
directory is set to "/usr/joe/srch2", then the configuration file
should reference the data file's location as
"example-data/movie-data.json".

##3. Hostname/Ports (Required)
```
 <listeningHostname>127.0.0.1</listeningHostname>
 <listeningPort>8081</listeningPort>
```
This parameter is the network identification (i.e., IP address or host name) of the server on which the SRCH2 engine is listening.
NOTE: If you want the server to accept all incoming packets, please use <b>0.0.0.0</b>.

The following parameters allow certain operations on different ports.  This feature allows network-based security
to be implemented using standard firewall functionality.  Typically, the "search" and "info" operations remain on a port
accessible from any IP address.  Operations such as "suggest", "docs", "update", "save", "export", and "resetLogger" are placed on a port to which access is restricted by a firewall to internal IP addresses.  An example of relocating ports is provided in
the advanced example configuration file in [example-demo/srch2-config-advanced.xml](../example-demo/srch2-config-advanced.xml).

###3.1 SearchPort (Optional)
This parameter overrides "listeningPort" for "search" requests.  "Search" requests must be sent to this port instead.

###3.2 SuggestPort (Optional)
This parameter overrides "listeningPort" for "suggest" requests.  "Suggest" requests must be sent to this port instead.

###3.3 InfoPort (Optional)
This parameter overrides "listeningPort" for "info" requests.  "Info" requests must be sent to this port instead.

###3.4 DocsPort (Optional)
This parameter overrides "listeningPort" for "docs" requests.  "Docs" requests must be sent to this port instead.

{'fraction_non_alphanumeric': 0.08383671975105253, 'fraction_numerical': 0.013545670876807615, 'mean_word_length': 4.812765957446809, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3012455', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1445, 'n_words': 713}