We store a list of keywords in the database as a comma-delimited string. I want to use Sphinx to query against the field, but I'm worried that the keywords would all be treated as a single word since there are no spaces. I went ahead and edited the MySQL query in the sphinx.conf file to SELECT REPLACE(keywords, ',', ' ') so that they would each be recognized as individual words, but is this necessary? How does Sphinx treat commas (and other punctuation, for that matter) and are they treated differently than spaces?

Recommended Answers

All 2 Replies

Thanks ... It says that the charset table can be used to give a comma-delimited list of characters to be indexed, but not about whether it's possible to escape the comma character in this comma-delimited list.

Still curious as to whether a comma is treated like a space or indexed by default.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.