私はPostgreSQLでの全文検索に不慣れで、辞書やストップワードなどを発見しました。
私は多くのテキストからのたくさんの単語を含むテーブルを持っています。独自の辞書を作成し、最初の30個の最も頻繁な単語をストップワードとして配置したいと思います。
実行時にこれを行うことは可能ですか?
私はPostgreSQLでの全文検索に不慣れで、辞書やストップワードなどを発見しました。
私は多くのテキストからのたくさんの単語を含むテーブルを持っています。独自の辞書を作成し、最初の30個の最も頻繁な単語をストップワードとして配置したいと思います。
実行時にこれを行うことは可能ですか?
Anything is possible. Not everything is feasible.
What you can do without too much difficulty is create a stored procedure in a language like pl/perlU which breaks up the words, analyzes them, and writes stop words to a file. You'd have to do a pg_ctl reload
in order to ensure that the new stop words file was used. However I don't think you can dynamically determine stop words at search time because if you search through the strings to look for stop words, there isn't much point in then having full text searching.
The actual stop words file is just a new-line separated list of words. Also I think you'd need to start with a template for stemming purposes. Trying to dynamically discover stemming would be both difficult and error-prone.