2 ms·
Closest thing Cassandra has to behaving like a search engine is the new SASI indexes. Good deep dive here: http://www.doanduyhai.com/blog/?p=2058 http://www.doa
by cnlwsu 10y ago
Closest thing Cassandra has to behaving like a search engine is the new SASI indexes. Good deep dive here: http://www.doanduyhai.com/blog/?p=2058 http://www.doanduyhai.com/blog/?p=2058 which describes how its different from elastic search in "SASI vs Search Engines" section.
- SASI requires 2 passes on disk to fetch data: 1 pass to read the index files and 1 pass for the normal
Cassandra read path whereas search engines retrieves the result in a single pass (DSE Search has a singlePass option too).
By laws of physics, SASI will always be slower, even if we improve the sequential read path in Cassandra
- Although SASI allows full text search with tokenization and CONTAINS mode, there is no scoring applied
to matched terms SASI returns result in token range order, which can be considered as random order from the
user point of view. It is not possible to ask for total ordering of the result, even when LIMIT clause is used.
Search engines don't have this limitation
- last but not least, it is not possible to perform aggregation (or faceting) with SASI.
The GROUP BY clause may be introduced into CQL in a near future but it is done on Cassandra side,
there is no pre-aggregation possible on SASI terms that can help speeding up aggregation queries