我正在尋找用于真正全文索引的資料庫解決方案。我已經閱讀了 Postgres 的全文搜索章節,但它描??述了不是“完整”索引的文本搜索,它本質上是啟發式的。
但是我發現這個https://pgpedia.info/f/fulltextindex.hml contrib/fulltextindex 模塊聽起來很有希望。
所以我的問題如下。
為什么它在 PostgreSQL 8.1 中被洗掉了?
我該如何使用它?
還有其他支持這種功能的替代資料庫解決方案嗎?
可以期待的性能是什么?
uj5u.com熱心網友回復:
用于全文搜索的索引是 GiST 索引,它沒有任何啟發式(“picksplit”演算法除外)。“fulltextindex”在 8.2 中被洗掉,全文搜索在 8.3 中被添加到核心,所以這就是你應該使用的。
WARNING從 8.1 版讀取檔案:
WARNING
-------
This implementation of full text indexing is very slow and inefficient. It is
STRONGLY recommended that you switch to using contrib/tsearch which offers these
features:
Advantages
----------
* Actively developed and improved
* Tight integration with OpenFTS (openfts.sourceforge.net)
* Orders of magnitude faster (eg. 300 times faster for two keyword search)
* No extra tables or multi-way joins required
* Select syntax allows easy 'and'ing, 'or'ing and 'not'ing of keywords
* Built-in stemmer with customisable dictionaries (ie. searching for 'jellies' will find 'jelly')
* Stop words automatically ignored
* Supports non-C locales
Disadvantages
-------------
* Only indexes full words - substring searches on words won't work.
eg. Searching for 'burg' won't find 'burger'
Due to the deficiencies in this module, it is quite likely that it will be removed from the standard PostgreSQL distribution in the future.
PostgreSQL 是開源的。要查看導致模塊被洗掉的討論,請搜索檔案。你會發現這個和這個。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/492800.html
標籤:sql PostgreSQL 全文搜索
