Professional Documents
Culture Documents
3 Cheatsheets
contact@manticoresearch.com
3 Cheatsheets
Relevancy rankers (for OPTION ranker=xyz) Full-text search operators Numeric functions
contact@manticoresearch.com
3 Cheatsheets
stats BIGINT()
show statistics of keywords, default is 0 Forcibly promotes the integer argument to 64-bit type,
and does nothing on floating point argument.
fold_wildcards
fold wildcards, default is 1 INTEGER()
Forcibly promotes given argument to 64-bit signed
fold_lemmas type.
fold morphological lemmas, default is 0
SINT()
fold_blended Forcibly reinterprets its 32-bit unsigned integer
fold blended words, default is 0 argument as signed, and also expands it to 64-bit type
(because 32-bit type is unsigned).
expansion_limit
override expansion_limit defined in configuration,
default is 0 (use value from configuration)
sort_mode
sort output by 'docs' or 'hits', default no sorting
contact@manticoresearch.com
3 Cheatsheets
Specific RealTime index settings Index common settings Index common settings
contact@manticoresearch.com
3 Cheatsheets
common settings Common Searchd daemon usage Common Indexer daemon usage
lemmatizer_base It is recommended to install and run the searchd as a Indexer should run under the same user the searchd runs.
Lemmatizer dictionaries base path. service to ensure in case of reboots, searchd will start at This is to make sure searchd can rotate indexes created by
boot. indexer.
progressive_merge
Merge Real-Time index chunks during OPTIMIZE
operation from smaller to bigger. Enabled by default. If searchd should run under a specific user. Linux packages $ indexer --config /path/to/sphinx.conf index --
disabled, chunks are merged from first to last created. create specific user (manticore or manticoresearch), as well rotate
as they install a service file The most common use of indexer is to issue an
json_autoconv_keynames indexing followed by a rotation, while searchd is
Whether and how to auto-convert key names within $ service manticore start
running
JSON attributes. Known value is ‘lowercase’. Optional,
default value is unspecified (do not convert anything).
$ service manticore stop Is searchd is not running, parameter --rotate should be
omitted. The new index version will replace existing
json_autoconv_numbers or one at searchd startup.
Automatically detect and convert possible JSON $ systemctl start manticore
strings that represent numbers, into numeric attributes. $ systemctl stop manticore Indexer can be used to extract a dictionary of most
Optional, default value is 0 (do not convert strings into common words from an index, using --buildstops. --
numbers). buildfreqs provides additionally the quantity presence.
Searchd can also be run manually.Here are several
on_json_attr_error common commands used:
What to do if JSON format errors are found. Optional, $ indexer myindex --buildstops word_freq.txt 1000
default value is ignore_attr (ignore errors). Applies only $ searchd --buildfreqs
to sql_attr_json attributes. start searchd using a defined configuration file. It start
plugin_dir daemonized, except Windows. Indexer can merge two indexes into one. This can be used
Trusted location for the dynamic libraries (UDFs). $ searchd --stopwait
in case of main+delta setups
Optional, default is empty (no location). Synced stop
rlp_environment $ indexer --merge main delta --rotate
--config /path/to/sphinx.conf
RLP environment configuration file. Mandatory if RLP is Specify config file. In absence of it, depending on how
used. was compiled, searchd can try to locate the config file Other useful parameters include --print-queries for
in current folder or a specific folder set at compilation printing the SQL queries run by a plain index with SQL
rlp_max_batch_docs source and --dump-rows to dump the fetched rows from
Maximum number of documents batched before $ searchd --status a SQL source to a file
processing them by the RLP. Optional, default is 50. Prints status and performance counters (same as
This option has effect only if morphology = SHOW STATUS)
rlp_chinese_batched is specified.
$ searchd --logdebug|--logdebugv|logdebugvv
rlp_max_batch_size Enabled additional debug output in daemon log
Maximum total size of documents batched before Configuration file
processing them by the RLP. Optional, default is 51200. $ searchd --iostats --cpustats
Provide io/cpu counter stats
rlp_root
Path to the RLP root folder. Mandatory if RLP is used. $ searchd --install Config use a custom plain format. Each section starts with
Install searchd as service on Windows name and the list of directives are enclosed by curly
brackets.
Searchd supports receiving signals.
$ kill -TERM cat /var/run/searchd.pid Sections:
HTTP JSON API
Sends a shutdown signal
searchd
$ kill -HUP cat /var/run/searchd.pid
Holds searchd settings. Only one section allowed
Initiate index rotation. This will also reload the
/json/insert configuration and can be used to activate new indexes
creates new document indexer
(like a new distributed index). Holds indexer settings. Only one section allowed
/json/replace
replace existing document
$ kill -USR1 cat /var/run/searchd.pid common
Force reopen of log files, useful for implemention log Holds several settings common to searchd and indexer.
New updates are put first in a fixed size memory called file rotation Only one section allowed
RAM chunk
index
/json/delete Index definition section.Multiple allowed
delete existing documents
Quick facts about index types source
/json/bulk Plain index source definiton. Multiple allowed
Allows bulking /insert,/replace,delete. Unlike other
endpoints, this requires request body in NDJSON
format plain
immutable text data.Require full reindexing. Attributes
/json/search can be updated.
Perform searches
Can use one or more defined sources
/json/pq
Perform percolate queries Can be converted to a RealTime index
RealTime
Starts empty,data can be added/changed/deleted
similar to a SQL table.New updates are put first in a
fixed size memory called RAM chunk
When filled, the RAM chunk is discarded to disk as a
disk chunk (which is almost identical as a plain index)
As disk chunk increase, performance is affected and
OPTIMIZE needs to be run.
distributed
Holds no data
Acts as master to local and/or remote indexes, by
sending queries to them and merging back the results.
In case of locals,dist_threads needs to be used to allow
creating parallel query threads
supports mirrors of remote indexes and load balancing
template
Holds no data
Can be used to test tokenization rules or highlighting
incoming data
percolate
Stores queries and not documents.It's based on
RealTime type.
The only index type that supports CALL PQ command
contact@manticoresearch.com