问题
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