【发布时间】:2015-05-31 18:38:29
【问题描述】:
我需要 Solr 中的高级停用词过滤器。
我们需要将停用词存储在数据库中,并能够由用户更改它们(每个用户都应该有自己的停用词)。这就是为什么我正在考虑发送停用词 从我们的应用程序 solr 或从 solr 连接到我们的数据库,并在自定义 StopFilterFactory 中使用更新的停用词。
此外,每个用户都有自己的停用词列表,该列表将存储在 mysql db“停用词”表中。 (id、user_id、停用词)。
我们有下一个索引结构。该索引将存储所有用户的数据。
<field name="user_id" type="int" indexed="true" stored="true" required="true" multiValued="false" />
<field name="tag_name" type="text_general" indexed="true" stored="true" required="false" multiValued="false"/>
...
<field name="tag_description" type="text_general" indexed="true" stored="true" required="false" multiValued="false"/>
我不确定如何实现上述行为,但我正在考虑编写自己的自定义 StopFilterFactory,它将从数据库中获取停用词,并在索引文档时为用户使用不同的停用词。
你有什么建议?那可能吗 ?我走对了吗?
【问题讨论】:
标签: solr lucene solrj solr4 stop-words