开发者

Always-indexed MySQL indexing/searching replacements for InnoDB?

开发者 https://www.devze.com 2023-01-03 22:24 出处:网络
I am using InnoDB for a MySQL table, and obviously queries using LIKE and RLIKE/REGEXP can take a lot of time.

I am using InnoDB for a MySQL table, and obviously queries using LIKE and RLIKE/REGEXP can take a lot of time.

I've tried Spinx, and it works great, except I have to re-index context at intervals. I can re-index every minute, but I am wondering if there is either 1) a 开发者_如何学Gosetting in Sphinx to keep records always indexed or 2) other software besides Sphinx that will keep records always indexed.

I want it where that immediately upon inserting or updating a record, the index is updated.


One of the Apache Lucene projects would probably do you best.

They're designed to build reverse indexes on text content including optional abilities to do some natural language processing. Lucene is the base project, originally written in Java but now also ported to .Net - this uses a very efficient file based store for the data.

For bigger indexes there's the Solr project which is basically a service based version of Lucene that you can access via rest-ful services. This also has options for scaling such as through sharding the indexes accross multiple machines.


  1. Are you sure your text is indexed as fulltext?
  2. try to use like or boolean match against instead of regex.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号