Mysql search with Match Against for searching relevant words
Is it possible to search for a term with its relevants using Mysql's MATCH AGAINST?
For example could I get informational by searching for information? I know it is possible with LIKE with % sign but unfortunately LIKE cannot calculate relevancy.
What is the best way of ordering results by relevancy a开发者_JAVA技巧nd same time be able to searching for relevant words?
As indicated in this blog post, MySQL fulltext is slow when it comes to ordering. Apache Lucene would be an alternative.
Relevancy can be taken into account too. Here is the full list of 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
精彩评论