Skip to content

Commit b8788bc

Browse files
authored
chore(search): update README to add some references for KQIR (#2581)
1 parent 0d5f851 commit b8788bc

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/search/README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
## KQIR: Kvrocks Query Intermediate Representation
1+
## KQIR (a.k.a. Kvrocks Search): Kvrocks Query Intermediate Representation
22

33
Here, *KQIR* refers to both
44
- the multiple-level *query intermediate representation* for Apache Kvrocks, and
55
- the *architecture and toolset* for the query optimization and execution.
66

7+
Note that when interacting with users, we also refer to KQIR as *Kvrocks Search* to prevent overwhelming with excessive technical information.
8+
79
### Architecture
810

911
![Architecture of KQIR](../../assets/KQIR.png)
1012

1113
### Components
1214

13-
- User Interface: both SQL and Redis Query syntax is supported to be the frontend language of KQIR
15+
- User Interface: both SQL and RediSearch Query syntax is supported to be the frontend language of KQIR
1416
- SQL Parser: A parser that accepts an extended subset of MySQL syntax
15-
- Redis Query Parser: A parser that accepts [Redis query syntax](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax/) (only DIALECT 2 or greater is planned to be supported)
17+
- Redis Query Parser: A parser that accepts [RediSearch query syntax](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/query_syntax/) (only DIALECT 2 or greater is planned to be supported)
1618
- KQIR: a multiple level query intermediate representation, currently including two levels (syntactical IR and planning IR)
1719
- Syntactical IR: A high level IR that syntactically represents the query language
1820
- Planning IR: A low level IR that represents plan operators for query execution
1921
- KQIR passes: analysis and transformation procedures on KQIR
2022
- Semantic Checker: to check if there is any semantic errors in the IR
21-
- Expression Passes: passes for query expressions, especially for logical expressions
22-
- Numeric Passes: passes for numeric & arithmetic properties
23-
- Plan Passes: passes on the plan operators
23+
- Expression Passes: passes for query expressions, especially for logical/boolean expressions
24+
- Numeric Passes: passes for numeric & arithmetic expressions utilizing math properties
25+
- Planning Passes: passes on the plan operators for scheduling a better execution plan
2426
- Pass Manager: to manage the pass execution sequence and order
25-
- Cost Model: to analyze the cost for the current plan, used by some plan passes
26-
- Plan Executor: a component for query execution via iterator model
27+
- Cost Model: to analyze the cost for the current plan, used by some planning passes
28+
- Plan Executor: a component for query execution via the iterator model
2729
- Indexer: to perform the indexing for various types of fields during data changes
30+
31+
### References
32+
33+
- [KQIR: a query engine for Apache Kvrocks that supports both SQL and RediSearch queries](https://kvrocks.apache.org/blog/kqir-query-engine)
34+
- [Index encoding format for Kvrocks Search](https://kvrocks.apache.org/community/kvrocks-search-index-encoding)

0 commit comments

Comments
 (0)