You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/sql-reference/dictionaries/index.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -800,7 +800,9 @@ This type of storage is for use with composite [keys](#dictionary-key-and-fields
800
800
801
801
### ip_trie {#ip_trie}
802
802
803
-
This type of storage is for mapping network prefixes (IP addresses) to metadata such as ASN.
803
+
This dictionary is designed for IP address lookups by network prefix. It stores IP ranges in CIDR notation and allows fast determination of which prefix (e.g. subnet or ASN range) a given IP falls into, making it ideal for IP-based searches like geolocation or network classification.
804
+
805
+
<iframewidth="1024"height="576"src="https://www.youtube.com/embed/4dxMAqltygk?si=rrQrneBReK6lLfza"title="IP based search with the ip_trie dictionary"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
804
806
805
807
**Example**
806
808
@@ -2139,8 +2141,9 @@ For our example, the structure of dictionary can be the following:
2139
2141
2140
2142
## Polygon dictionaries {#polygon-dictionaries}
2141
2143
2142
-
Polygon dictionaries allow you to efficiently search for the polygon containing specified points.
2143
-
For example: defining a city area by geographical coordinates.
2144
+
This dictionary is optimized for point-in-polygon queries, essentially “reverse geocoding” lookups. Given a coordinate (latitude/longitude), it efficiently finds which polygon/region (from a set of many polygons, such as country or region boundaries) contains that point. It’s well-suited for mapping location coordinates to their containing region.
## Regular Expression Tree Dictionary {#regexp-tree-dictionary}
2272
2275
2273
-
Regular expression tree dictionaries are a special type of dictionary which represent the mapping from key to attributes using a tree of regular expressions. There are some use cases, e.g. parsing of [user agent](https://en.wikipedia.org/wiki/User_agent) strings, which can be expressed elegantly with regexp tree dictionaries.
2276
+
This dictionary lets you map keys to values based on hierarchical regular-expression patterns. It’s optimized for pattern-match lookups (e.g. classifying strings like user agent strings by matching regex patterns) rather than exact key matching.
0 commit comments