manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
8.86k stars 490 forks source link

Secondary indexes for JSON #1928

Open sanikolaev opened 6 months ago

sanikolaev commented 6 months ago

The task is to implement secondary indexes for JSON.

We made a research of performance issues of one Manticore Search users and we have determined that the key to enhancing the queries performance lies in utilizing secondary indexes for JSON attributes. This necessitates partial JSON flattening. In order to proceed, we need to design and implement the following features:

In summary, we will dynamically generate secondary indexes for JSON keys, which will then serve as shortcuts to bypass most documents when filtering using these keys.

tomatolog commented 6 months ago

not quite sure about array of float as if it work similar to mva there is no point to store individual float values and build index for every value

if float vector used for knn there no need to add SI for that type

glookka commented 2 months ago

Done in https://github.com/manticoresoftware/manticoresearch/commit/155d335b503294a01895ef7ae4919b7142661b65

sanikolaev commented 2 months ago

The task to document this is https://github.com/manticoresoftware/manticoresearch/issues/2348

sanikolaev commented 1 month ago

Reopening to update OpenAPI yaml, so it's possible to control creating secondary indexes via clients.