blog-post

Manticore Search 6.3.0

我们很高兴地宣布 Manticore Search 6.3.0 的发布!这个版本带来了大量的增强功能、新特性和更新,使您的搜索引擎更加强大和用户友好。

向量搜索

  • 浮点向量数据类型:我们引入了 float_vector 数据类型,该类型允许您存储和查询浮点数数组。这对于需要使用向量搜索执行相似度搜索的应用尤其有用。
  • 向量搜索能力:与新数据类型结合,向量搜索功能使您能够执行 k 最近邻 (KNN) 向量搜索。这对于构建更直观和响应迅速的应用搜索功能非常理想。请在博客文章 Manticore 中的向量搜索 中了解更多信息。

向量搜索博客文章

JOIN (测试版)

尽管仍处于测试版的 Manticore Search 加入了 JOIN 功能,代表了用户进行查询和管理数据关系的方法的重要增强。 在文档中了解更多

示例:

SELECT product, customers.email, customers.name, customers.address
FROM orders
LEFT JOIN customers
ON customers.id = orders.customer_id
WHERE MATCH('maple', customers)
ORDER BY customers.email ASC;

+----------+-------------------+----------------+-------------------+
| product  | customers.email   | customers.name | customers.address |
+----------+-------------------+----------------+-------------------+
| Phone    | NULL              | NULL           | NULL              |
| Monitor  | NULL              | NULL           | NULL              |
| Keyboard | NULL              | NULL           | NULL              |
| Laptop   | alice@example.com | Alice Johnson  | 123 Maple St      |
| Tablet   | alice@example.com | Alice Johnson  | 123 Maple St      |
+----------+-------------------+----------------+-------------------+
5 rows in set (0.00 sec)

正则表达式

新的 REGEX 运算符 显著改善了您搜索复杂文本模式的方式。这个特性在需要非常准确的搜索结果的领域尤其重要,例如分析专利、审查合同和搜索商标。

例如,在数据分析中,REGEX 运算符可以帮助查找日志文件或代码中的特定错误代码或编程模式。在学术研究中,它使得查找使用特定引用风格的文章变得更容易。对于商标搜索,此工具非常适合识别完全相同或非常相似的商标。此增强功能使得 Manticore Search 在处理详细和复杂搜索时更加强大和精确。

博客文章 中了解更多:
REGEXP 博客文章

示例:

SELECT * FROM brands WHERE MATCH('"REGEX(/(c|sea).*crest/) REGEX(/flo(we|u)r/)"')
+---------------------+-----------------+
| id                  | name            |
+---------------------+-----------------+
| 1515699435999330620 | SeaCrest Flower |
| 1515699435999330621 | C-Crest Flour   |
| 1515699435999330622 | CCrest Flower   |
+---------------------+-----------------+

Range() 和 histogram()

新的 RANGE 函数 通过将值分类到指定间隔,从而增强聚合、分面和分组。使用 range_fromrange_to 定义这些间隔,这决定了值落入的边界。此功能允许基于用户定义的范围有效地对数据进行排序和分析。

示例:

 select * from test;
+---------------------+-----------+-------+
| id                  | data      | value |
+---------------------+-----------+-------+
| 8217240980223426563 | Product 1 |    12 |
| 8217240980223426564 | Product 2 |    15 |
| 8217240980223426565 | Product 3 |    23 |
| 8217240980223426566 | Product 4 |     3 |
+---------------------+-----------+-------+

SELECT COUNT(*), RANGE(value, {range_to=10},{range_from=10,range_to=25},{range_from=25}) price_range FROM test GROUP BY price_range ORDER BY price_range ASC;
+----------+-------------+
| count(*) | price_range |
+----------+-------------+
|        1 |           0 |
|        3 |           1 |
+----------+-------------+

HISTOGRAM() 函数在 Manticore Search 中根据指定的桶大小将数据分类到桶中。它使用 hist_intervalhist_offset 参数确定适当的桶,并返回每个值的桶编号。该函数通过测量桶的起始点与桶键的距离来计算桶键,并根据间隔大小进行调整。此功能对于创建直方图尤其有用,这可以将数据分组成特定值范围,以便于分析和可视化。

示例:

select count(*), histogram (value, {hist_interval=10}) as price_range from test GROUP BY price_range ORDER BY price_range ASC;
+----------+-------------+
| count(*) | price_range |
+----------+-------------+
|        1 |           0 |
|        2 |          10 |
|        1 |          20 |
+----------+-------------+

There are also date_range and date_histogram for similar aggregations with date/time data.

New commands to simplify data updates and schema management

在复制领域进行了重大更改,以改善节点之间的数据传输过程。修复了传输大文件时的复制错误,添加了重试命令执行的机制,并改善了复制过程中的网络管理。解决了在复制和属性更新过程中阻塞的问题,并为加入集群的节点添加了跳过复制更新命令的功能。所有这些更改都提高了在各种使用场景中复制过程的效率和可靠性。

有关更改的详细信息,请参阅 here

License change and performance optimizations

我们已将 Manticore Search 的许可证更改为 GPLv3-or-later。这个新许可证为用户提供了更好的法律保障,并与其他开源许可证协同更好。此更改显示了我们致力于满足社区需求和保持开源软件强大的决心。在版本 6.3.0 中,我们添加了 Apache 2 许可证的 CCTZ library ,使日期/时间函数变得更快。看看改进:

Before:

mysql> select count(*),year(time_local) y, month(time_local) m from logs10m where y>2010 and m<5;
+----------+------+------+
| count(*) | y    | m    |
+----------+------+------+
| 10365132 | 2019 |    1 |
+----------+------+------+
1 row in set (8.26 sec)

Now:

mysql> select count(*),year(time_local) y, month(time_local) m from logs10m where y>2010 and m<5;
+----------+------+------+
| count(*) | y    | m    |
+----------+------+------+
| 10365132 | 2019 |    1 |
+----------+------+------+
1 row in set (0.11 sec)

The query is now 75 times faster.

我们还改善了表的压缩方式。之前,在合并磁盘块时,Manticore 从包含已删除文档的任何块中移除了这些文档,使用了大量资源。我们已停止使用这种方法。现在,合并块仅由 progressive_merge 设置管理,这使得该过程更简单,并减少了对资源的占用。

Ubuntu Noble 24.04

现在支持 Ubuntu Noble 24.04。
Noble

And many more

上述的更新仅是 Manticore 6.3.0 中许多改进的一部分。请阅读:

🚀 9 major changes
✅ 50+ minor changes
🐞 120+ bug fixes

changelog 中。

我们希望您喜欢 Manticore Search 的新功能和改进。我们欢迎您的反馈,并鼓励您通过以下方式与我们互动:

安装Manticore Search

安装Manticore Search