问题
i want to know how to get all column value from table using sphinx search...
i have configuration file, that file can get only one field from table.
but i need all field value.
where will i modify for getting all field from table.
thanks and advance...
回答1:
Sphinx will only return the document id, weight and attributes. Use MySQL to get the rest of the values.
- Do a Sphinx search, which will give you a list of document IDs
- For every document ID, do a MySQL query which gives you the values for all fields.
回答2:
I think there are some tricks could be used for the problem.
if the column is not included in fulltext search, you could add it into attr entry. e.g. for field name and age, in xmlpipe2 source config file, you could add these in the
index
part:xmlpipe_attr_string = name xmlpipe_attr_uint = age
if the column is included in fulltext search, you could add it into attr entry and field entry the same time. e.g. for field intro, in xmlpipe2 source config file, you could add these in the index part:
xmlpipe_field = intro xmlpipe_attr_string = intro
来源:https://stackoverflow.com/questions/3050853/how-to-get-all-column-value-from-sphinx-by-configuration-file-php