Connoisseurs, Good day!

Help to deal with the sphinx, because after reading a bunch of manuals I could not understand one thing.

I set up the sphinx. He works and is looking for what you need. But returns only the id of the document. And I also want to return some fields. But how to add them to the output array - I can not understand. Who is not difficult - explain the essence. I use SphinxQL and the foolz library for output.

Here is the configuration:

source article { type = mysql sql_host = localhost sql_user = root sql_pass = sql_db = parser sql_port = sql_query_pre = SET NAMES utf8 sql_query = \ SELECT article_id, description, link \ FROM tb_articles sql_attr_uint = article_id } index article { source = article path = C:/openserver/domains/parser/data/article/ morphology = stem_ru min_word_len = 1 } index article_rt { type = rt rt_mem_limit = 128M path = C:/openserver/domains/parser/data/article_rt/ rt_field = article_id rt_field = description rt_field = link rt_attr_uint = article_id } searchd { listen = 127.0.0.1:9306:mysql41 log = C:\Sphinx/data/log/searchd.log query_log = C:\Sphinx/data/log/query.log pid_file = C:\Sphinx/data/log/searchd.pid } 

    1 answer 1

    you need to add the sql_attr attributes and do not forget to select them in the SELECT query.
    In general, they are used to filter or sort the results, but as an option, of course, you can get them from the sphinx.