Searching for hash tag via thinking sphinx

2019-06-10 00:21发布

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条回答
狗以群分
2楼-- · 2019-06-10 01:26

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.

查看更多
登录 后发表回答