poliqarpd
poliqarpd — the Poliqarp server
poliqarpd { -h | --help | -v | --version }
poliqarpd [
-g | --gui
] [
-d | --detach
] [
{ -c | --config-file }
file
]
-h, --helpDisplay help and exit.
-v, --versionOutput version information and exit.
-g, --guiGUI mode: cause the server to terminate when the session counter drops down to zero for the first time.
-d, --detachAfter poliqarpd is ready to accept connections, detach from the controlling terminal and run in the background.
-c, --config-file=file
Use the given file as a configuration file. The default is:
$HOME/.poliqarp/poliqarpd.conf (under Unix) or
poliqarpd.conf in the current directory (under Windows).
Empty lines and lines starting with # are comments. Otherwise a line is of the format
keyword = setting.
The possible keywords and their meanings are as follows:
hostname
Specifies the local address that poliqarpd listens on. The default address is 127.0.0.1.
New in poliqarpd 1.3.1.
portSpecifies the TCP port number that poliqarpd listens on. 0 means any port. Ports 1-1023 are normally reserved to superuser. Ports 1024-65536 should be available to anyone. The default port is 4567.
loggingonEnables server activity logging.
offDisables server activity logging.
The default value is off.
log-file
Specifies the log file name. The default is poliqarpd.log in the current
directory.
match-buffer-sizeSpecifies the initial size of match buffer (i.e., maximum number of stored results). The default value is 1000. The maximum value is 50000.
max-match-lengthRestricts the match length to the specified number of segments. The maximum and the default values are 1000.
New in poliqarpd 1.3.2.
max-session-idleRestricts life-time of an idle session to the specified number of seconds. The default value is 1200 (i.e. 20 minutes). The maximum value is 86400 (i.e. 24 hours).
corpusNew in poliqarpd 1.3.2.
anyAllows one to open any corpus in the file system.
This is the default if no other corpus settings are present.
corpus-id:base-name
Allows one to open the base-name corpus using the
corpus-id.
Under the hood, the corpus will be opened at poliqarpd startup and never closed.
As of poliqarpd 1.3.1, the only supported binary format version is 2. Please use bpupgrade(1) to convert your corpora.
PINGServer replies:
R PONG
GET-VERSIONServer replies:
Rserver-version(sakurasakura-version)
For this version,
=
server-version =
sakura-version1.3.14.
This command was renamed from VERSION in poliqarpd 1.3.7.
GET-LAST-ERRORIf no error was recorded, server replies:
R NOERROR
Otherwise, it replies:
R ERROR error-message
New in poliqarpd 1.2.
MAKE-SESSION session-nameCreate a new session. Server replies:
R OK session-id
RESUME-SESSION session-id session-name
Resume the previously suspended session, identified by
.
session-id
This command was renamed from RECONNECT in poliqarpd 1.3.7.
CLOSE-SESSIONClose the current session.
SUSPEND-SESSIONExplicitly suspend the current session.
Every open session is implicitly suspended if the TCP connection is terminated. However, suspending the session explicitly, gives the client a chance to receive pending asynchronous messages, which would otherwise be lost.
New in poliqarpd 1.3.1.
OPEN-CORPUS base-name
This command was renamed from OPEN in poliqarpd 1.3.7.
OPEN-CORPUS corpus-idPossibility to open pre-defined corpora was added in poliqarpd 1.3.2.
This command was renamed from OPEN in poliqarpd 1.3.7.
CLOSE-CORPUS
This command was renamed from CLOSE in poliqarpd 1.3.7.
GET-CORPUS-STATS
This command was renamed from CORPUS-STATS in poliqarpd 1.3.7.
GET-METADATA-TYPES
This command was renamed from METADATA-TYPES in poliqarpd 1.3.7.
GET-TAGSETServer replies:
R OKnumber-of-categoriesnumber-of-grammatical-classesRdescription-of-category-1…Rdescription-of-category-NRdescription-of-class-1Rdescription-of-class-2…Rdescription-of-class-M
where is of the form
description-of-category
and category-name
attr-1
attr-2
…
is of the form
description-of-class
where class-name
category-1
category-2
…
are names of the appropriate categories, in square
brackets if the category is optional.
category-X
New in poliqarpd 1.2.
GET-JOB-STATUS
This command was renamed from STATUS in poliqarpd 1.3.7.
CANCEL-JOB
This command was renamed from CANCEL in poliqarpd 1.3.7.
MAKE-QUERY queryRUN-QUERYSORT-RESULTS criteria
This command was renamed from SORT in poliqarpd 1.3.7.
GET-COLUMN-TYPESNew in poliqarpd 1.2.
GET-BUFFER-STATE
Server replies R OK .
capacity
num-stored-results
This command was renamed from BUFFER-STATE in poliqarpd 1.3.7.
GET-NUM-RESULTS
Server replies R OK .
num-spotted-results
New in poliqarpd 1.3.7.
BUFFER-SHIFTNot implemented.
GET-RESULTS n mChanged in Poliqarp 1.2.
GET-CONTEXT nGET-METADATA n
This command was renamed from GET-METADATA in poliqarpd 1.3.7.
SET-OPTION option-name option-settingThe following options are available:
left-context-width, right-context-width, wide-context-width
option-setting is width of the left/right/wide context: in
segments or characters if followed by a letter c.
retrieve-lemmata, retrieve-tags, retrieve-id
option-setting is a 4-character binary string
,
indicating whether lemmata/tags/identifiers should be retrieved for left context
(lLRrl), left match (L), right match
(R) and right context (r).
retrieve-id is new in poliqarpd 1.3.8.
notification-intervalquery-flags
option-setting is a 4-character binary string
indicating whether:
ixIX
regular expressions in main (i) and metadata (I) parts shoule be case-insensitive by default;
regular expressions in main (x) and metadata (X) parts don't have to match the whole segments or metadata items by default.
The default is as if “SET query-flags 0011” were run, i.e.:
regular expressions in the main part are case-sensitive;
regular expressions in the main part have to match the whole segments;
regular expressions in the metadata part are case-insensitive;
regular expressions in the metadata part don't have to match the whole metadata items.
disambrewriteNew in poliqarpd 1.3.3.
random-sampleNew in poliqarpd 1.3.7.
This command was renamed from SET in poliqarpd 1.3.7.
CREATE-ALIAS alias-name alias-valueDELETE-ALIAS alias-nameGET-ALIASESRESIZE-BUFFER n
This command was renamed from BUFFER-RESIZE in poliqarpd 1.3.7.