Percolate table

A percolate table is a special table that stores queries rather than documents. It is used for prospective searches, or "search in reverse."

The schema of a percolate table is fixed and contains the following fields:

Field Description
ID An unsigned 64-bit integer with auto-increment functionality. It can be omitted when adding a PQ rule, as described in add a PQ rule
Query Full-text query of the rule, which can be thought of as the value of MATCH clause or JSON /search. If per field operators are used inside the query, the full-text fields need to be declared in the percolate table configuration. If the stored query is only for attribute filtering (without full-text querying), the query value can be empty or omitted. The value of this field should correspond to the expected document schema, which is specified when creating the percolate table.
Filters Optional. Filters are an optional string containing attribute filters and/or expressions, defined the same way as in the WHERE clause or JSON filtering. The value of this field should correspond to the expected document schema, which is specified when creating the percolate table.
Tags Optional. Tags represent a list of string labels separated by commas that can be used for filtering/deleting PQ rules. The tags can also be returned along with matching documents when performing a Percolate query

Note that you do not need to add the above fields when creating a percolate table.

What you need to keep in mind when creating a new percolate table is to specify the expected schema of a document, which will be checked against the rules you will add later. This is done in the same way as for any other local table.

‹›
  • SQL
  • JSON
  • PHP
  • Python
  • javascript
  • java
  • C#
  • CONFIG
📋
Creating a percolate table via MySQL protocol:
CREATE TABLE products(title text, meta json) type='pq';
‹›
Response
Query OK, 0 rows affected (0.00 sec)

Template table

A Template Table is a special type of table in Manticore that doesn't store any data and doesn't create any files on your disk. Despite this, it can have the same NLP settings as a plain or real-time table. Template tables can be used for the following purposes:

  • As a template to inherit settings in the Plain mode, simplifying your Manticore configuration file.
  • Keyword generation with the help of the CALL KEYWORDS command.
  • Highlighting an arbitrary string using the CALL SNIPPETS command.
‹›
  • CONFIG
CONFIG
📋
Creating a template table via a configuration file:
table template {
  type = template
  morphology = stem_en
  wordforms = wordforms.txt
  exceptions = exceptions.txt
  stopwords = stopwords.txt
}

⪢ NLP and tokenization