ClickHouse/docs/en
Robert Schulze fa635358d2
Initial Analyzer support for vector similarity search
This code is extremely shameful, don't look at it.

Only goal of this PR is to demonstrate that the analyzer is able to see
vector similarity indexes:

ip-10-19-83-181.eu-central-1.compute.internal :) explain plan indexes=1 SELECT id, vec, L2Distance(vec, [0.0, 2.0])
FROM tab
ORDER BY L2Distance(vec, [0.0, 2.0])
LIMIT 3 settings enable_analyzer = 1

EXPLAIN indexes = 1
SELECT
    id,
    vec,
    L2Distance(vec, [0., 2.])
FROM tab
ORDER BY L2Distance(vec, [0., 2.]) ASC
LIMIT 3
SETTINGS enable_analyzer = 1

Query id: 086df46e-2e27-4342-a47c-6900762a7c8c

    ┌─explain─────────────────────────────────────────────────────────────────────────────────────────┐
 1. │ Expression (Project names)                                                                      │
 2. │   Limit (preliminary LIMIT (without OFFSET))                                                    │
 3. │     Sorting (Sorting for ORDER BY)                                                              │
 4. │       Expression ((Before ORDER BY + (Projection + Change column names to column identifiers))) │
 5. │         ReadFromMergeTree (default.tab)                                                         │
 6. │         Indexes:                                                                                │
 7. │           PrimaryKey                                                                            │
 8. │             Condition: true                                                                     │
 9. │             Parts: 1/1                                                                          │
10. │             Granules: 1/1                                                                       │
11. │           Skip                                                                                  │
12. │             Name: idx                                                                           │
13. │             Description: vector_similarity GRANULARITY 100000000                                │
14. │             Parts: 1/1                                                                          │
15. │             Granules: 1/1                                                                       │
    └─────────────────────────────────────────────────────────────────────────────────────────────────┘

15 rows in set. Elapsed: 0.007 sec.
2024-11-06 22:10:12 +00:00
..
development Merge pull request #70953 from lio-p/migrate-play-urls 2024-10-24 16:24:39 +00:00
engines Initial Analyzer support for vector similarity search 2024-11-06 22:10:12 +00:00
getting-started Docs: An attempt to fix the missing sidebar for TPC-H/DS and SSB benchmark docs 2024-11-03 13:20:56 +01:00
interfaces Make the Replxx client history size configurable 2024-10-24 16:10:56 +02:00
operations Merge pull request #71145 from Algunenano/setting_tiers 2024-10-31 15:18:29 +00:00
sql-reference Merge pull request #71389 from den-crane/patch-76 2024-11-01 20:51:13 +00:00