Spade A
26ec841feb
feat: optimize Like query with n-gram ( #41803 )
...
Ref #42053
This is the first PR for optimizing `LIKE` with ngram inverted index.
Now, only VARCHAR data type is supported and only InnerMatch LIKE
(%xxx%) query is supported.
How to use it:
```
milvus_client = MilvusClient("http://localhost:19530 ")
schema = milvus_client.create_schema()
...
schema.add_field("content_ngram", DataType.VARCHAR, max_length=10000)
...
index_params = milvus_client.prepare_index_params()
index_params.add_index(field_name="content_ngram", index_type="NGRAM", index_name="ngram_index", min_gram=2, max_gram=3)
milvus_client.create_collection(COLLECTION_NAME, ...)
```
min_gram and max_gram controls how we tokenize the documents. For
example, for min_gram=2 and max_gram=4, we will tokenize each document
with 2-gram, 3-gram and 4-gram.
---------
Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
Signed-off-by: SpadeA-Tang <tangchenjie1210@gmail.com>
2025-07-01 10:08:44 +08:00
..
2025-05-20 21:06:24 +08:00
2025-05-20 21:06:24 +08:00
2025-05-23 10:30:28 +08:00
2025-06-04 11:26:32 +08:00
2025-06-11 13:40:38 +08:00
2025-05-28 12:46:28 +08:00
2025-02-22 23:15:58 +08:00
2025-05-20 21:06:24 +08:00
2023-09-21 09:45:27 +08:00
2024-11-07 10:26:26 +08:00
2025-05-23 14:16:29 +08:00
2025-05-23 14:16:29 +08:00
2025-05-23 14:16:29 +08:00
2025-05-23 14:16:29 +08:00
2025-05-29 10:54:30 +08:00
2025-05-23 10:30:28 +08:00
2025-05-23 10:30:28 +08:00
2025-05-28 12:46:28 +08:00
2025-05-28 12:46:28 +08:00
2025-02-22 23:15:58 +08:00
2025-02-22 23:15:58 +08:00
2025-05-20 21:06:24 +08:00
2025-06-04 22:46:32 +08:00
2025-05-20 21:06:24 +08:00
2025-02-22 23:15:58 +08:00
2025-06-24 16:30:49 +08:00
2025-06-24 16:30:49 +08:00
2025-02-22 23:15:58 +08:00
2025-02-22 23:15:58 +08:00
2025-05-27 20:54:28 +08:00
2025-05-22 23:24:28 +08:00
2025-05-27 20:54:28 +08:00
2025-05-27 20:54:28 +08:00
2025-02-22 23:15:58 +08:00
2025-02-22 23:15:58 +08:00
2025-05-27 20:54:28 +08:00
2025-05-22 23:24:28 +08:00
2025-05-20 21:06:24 +08:00
2025-06-04 11:24:38 +08:00
2025-05-23 12:58:27 +08:00
2025-05-23 12:58:27 +08:00
2025-06-24 16:30:49 +08:00
2025-04-01 10:36:22 +08:00
2025-05-20 21:06:24 +08:00
2024-01-24 00:04:55 +08:00
2025-05-20 21:06:24 +08:00
2025-02-22 23:15:58 +08:00
2023-09-26 17:15:27 +08:00
2025-06-13 17:44:38 +08:00
2025-06-19 16:32:39 +08:00
2024-09-13 22:05:15 +08:00
2025-04-08 15:06:25 +08:00
2025-06-13 17:44:38 +08:00
2025-06-12 20:02:35 +08:00
2025-06-12 20:02:35 +08:00
2025-05-28 12:46:28 +08:00
2025-05-28 12:46:28 +08:00
2025-02-22 23:15:58 +08:00
2025-05-20 21:06:24 +08:00
2025-05-23 12:58:27 +08:00
2025-05-23 12:58:27 +08:00
2025-05-23 12:58:27 +08:00
2025-05-23 12:58:27 +08:00
2025-05-23 12:58:27 +08:00
2025-05-20 21:06:24 +08:00
2025-06-11 13:40:38 +08:00
2025-06-25 23:38:41 +08:00
2025-04-20 22:56:44 +08:00
2025-04-20 22:56:44 +08:00
2025-05-20 21:06:24 +08:00
2025-05-28 12:46:28 +08:00
2025-05-28 10:00:28 +08:00
2025-06-10 19:14:35 +08:00
2025-06-10 19:14:35 +08:00
2025-06-10 19:14:35 +08:00
2025-06-04 11:24:38 +08:00
2025-06-04 11:24:38 +08:00
2025-05-23 18:32:26 +08:00
2025-02-22 23:15:58 +08:00
2025-06-04 22:46:32 +08:00
2025-03-14 15:44:22 +08:00
2025-05-20 21:06:24 +08:00
2025-05-20 21:06:24 +08:00
2025-05-23 14:16:29 +08:00
2025-05-20 21:06:24 +08:00
2025-05-20 21:06:24 +08:00
2025-05-20 21:06:24 +08:00
2025-06-13 17:44:38 +08:00
2025-06-11 13:40:38 +08:00
2025-05-20 21:06:24 +08:00
2025-05-23 18:32:26 +08:00
2025-02-22 23:15:58 +08:00
2025-05-20 21:06:24 +08:00
2025-06-13 17:44:38 +08:00
2025-05-20 21:06:24 +08:00
2025-05-20 21:06:24 +08:00
2021-11-16 15:41:11 +08:00
2025-02-22 23:15:58 +08:00
2025-02-22 23:15:58 +08:00
2025-03-11 14:56:16 +08:00
2025-03-11 14:56:16 +08:00
2021-10-15 18:58:37 +08:00
2025-04-07 22:16:23 +08:00
2025-04-07 22:16:23 +08:00
2025-02-22 23:15:58 +08:00
2025-06-04 11:24:38 +08:00
2025-05-23 18:32:26 +08:00
2025-05-23 18:32:26 +08:00
2025-02-22 23:15:58 +08:00
2025-04-10 15:20:28 +08:00
2025-06-11 13:40:38 +08:00
2025-06-13 17:44:38 +08:00
2025-06-11 13:40:38 +08:00
2025-06-26 19:14:42 +08:00
2025-06-05 15:42:32 +08:00
2025-07-01 10:08:44 +08:00
2025-05-20 21:06:24 +08:00
2025-05-30 21:52:30 +08:00
2025-03-25 13:46:25 +08:00
2025-02-22 23:15:58 +08:00
2025-05-20 21:06:24 +08:00
2025-05-22 23:24:28 +08:00
2025-05-20 21:06:24 +08:00
2025-05-29 10:54:30 +08:00
2025-05-20 21:06:24 +08:00
2025-06-04 22:46:32 +08:00
2025-02-22 23:15:58 +08:00
2025-06-12 16:56:36 +08:00