Searching for hash tag via thinking sphinx

大兔子大兔子 提交于 2019-12-08 11:13:16

问题


Is it possible to search hash tag via thinking_spinx? Can't find solution. Need to find all titles with hash tag only: "title#text","#text", etc.


回答1:


You'll want to make sure Sphinx is indexing the hash character - which is done via the charset_table setting. Thinking Sphinx finds this value in config/sphinx.yml (create it if you haven't already), which is set up via environments, much like config/database.yml.

development:
  charset_table: "0..9, A..Z->a..z, _, a..z, \#, U+410..U+42F->U+430..U+44F, U+430..U+44F"

All other characters and character ranges listed are Sphinx's default set for UTF-8, which is what Thinking Sphinx uses by default.



来源:https://stackoverflow.com/questions/8637330/searching-for-hash-tag-via-thinking-sphinx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!