Percolate queries: Schemaless and expression filtering

In this article we discuss how schemaless docs can be used in Percolate Queries.

The Percolate Query feature allows storing not only fulltext matches, but also regular attribute filtering.
Until 2.7.0 this was limited to a single numeric attribute condition.

Now filtering can work with string and JSON attributes. The JSON filtering is interesting as you can test schemaless documents against stored queries. The filtering also now supports multiple attribute filtering and usage of expressions, which allows more complex stored criterias.

Percolate Queries: docs_id option

In this article we discuss the docs_id option which provides an easier manipulation of CALL PQ result set. Let's consider the following PQ batch call:

mysql> CALL PQ ('pq', ('{"title":"butter is good as", "id":3}', 
                       '{"title":"was butter","id":4}', 
                       '{"title":"sas was butter","id":5}', 
                       '{"title":"bas was butter", "id":6}', 
                       '{"title":"butter is good as","id":7}'), 
                 1 as docs_json ,1 as docs,1 as query);
| UID  | Documents | Query      | Tags | Filters |
|    1 | 1,5       | butter is  |      |         |
|    2 | 2,3,4     | butter was |      |         |
2 rows in set (0.00 sec)

What is wrong with this output? […]

Using ProxySQL to route INSERTs in a distributed RealTime index

In this article we'll discuss a how-to use ProxySQL to route inserts to a distributed RT index while using Sphinx/Manticore Search. The distributed index in Manticore allow UPDATE over multiple RealTime indexes as the UPDATE is sent to all indexes, but change occurs only on one index (assuming you have unique IDs across the indexes). For inserts the distributed index doesn't know which index should select, this means we need to send the insert to one of the RealTime subindexes, which must be implemented in the application code. This has the disadvantage that making changes to the distributed index (adding a new RT subindex, for example), requires making changes in the  application code. […]


Personal and team training will maximize them performance. 

Custom development

Need cone custom or individual features?

Fill the form and don’t forget to make the description of what you need.

Free config review

There are often optimizations that can be made to a Sphinx / Manticore setup by changing some simple directives in the configuration or making quick changes to an index definition.

Some common mistakes and issues can include:

  • doing main+delta without kill-lists, even if the delta does include updated records found in the main
  • using wildcarding with very short prefix/infix which can hammer performance in some cases
  • disabled (unintentional) seamless rotates and getting stalls on index rotations
  • adding texts as string attributes even if they are not using for any kind of operation (filtering, grouping, sorting) or mandatory to be present in results
  • using deprecated settings 

Having a quick look on the configuration can show issues or potential issues, this is why we want to offer a gift to our growing community!

When uploading your configuration file, we recommend to remove any database credentials first.

We suggest also you give as many possible details about your setup: how big is the data you have, how typical queries look and what issues you experience.

Contact us