gpt4 book ai didi

Mysql search with Match Against 搜索相关词

转载 作者:行者123 更新时间:2023-11-29 03:45:58 30 4
gpt4 key购买 nike

是否可以使用 Mysql 的 MATCH AGAINST 来搜索与其相关的术语?

例如,我可以通过搜索信息来获取信息吗?我知道可以使用带有 % 符号的 LIKE,但不幸的是,LIKE 无法计算相关性。

按相关性对结果进行排序并同时能够搜索相关词的最佳方式是什么?

最佳答案

this blog post 中所示, MySQL fulltext订购时速度很慢。 Apache Lucene将是另一种选择。

也可以考虑相关性。这是 Lucene features 的完整列表:

Scalable, High-Performance Indexing

  • over 95GB/hour on modern hardware
  • small RAM requirements -- only 1MB heap
  • incremental indexing as fast as batch indexing
  • index size roughly 20-30% the size of text indexed

Powerful, Accurate and Efficient Search Algorithms

  • ranked searching -- best results returned first
  • many powerful query types: phrase queries, wildcard queries, proximity queries, range queries and more
  • fielded searching (e.g., title, author, contents)
  • date-range searching
  • sorting by any field
  • multiple-index searching with merged results
  • allows simultaneous update and searching

Cross-Platform Solution

  • Available as Open Source software under the Apache License which lets you use Lucene in both commercial and Open Source programs
  • 100%-pure Java
  • Implementations in other programming languages available that are index-compatible

关于Mysql search with Match Against 搜索相关词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5411004/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com