Menu
  • HOME
  • TAGS

How get name of table in result array in Sphinx?

sphinx,django-sphinx

You can modify sql_query attribute of your indexes in sphinx.conf so they will return one fake attribute - index name. For example: first_idx: ... sql_query = SELECT <...>, 'first_idx' as index_name FROM fisrt_table; second_idx: ... sql_query = SELECT <...>, 'second_idx' as index_name FROM second_table; ...