views:

20

answers:

1

hi

i want to know how to delete all data from sphinx table.

because i would like to store new data to the table.

thanks and advance.

+1  A: 

I think, there is no such thing as a sphinx table, there are only index files.

If you want to delete all the sphinx indexes that you currently have stop sphinx and delete all the index files in your sphinx's data folder; then you can run indexer again, which will create new index files.

Tom Ilsinszki
hey i have another question.i am getting document id only from result of sphinx.i need to get all the columns from the table.what will i change in conf file or any place.if u know please let me to inform.
zahir hussain
You need to get 2 things right (probably you already did the first one).1. Set the sql_query property (if you are using sql) in the sphinx config file to something like: "SELECT id, field1, field2 FROM myTable", so that sphinx will know where to get the documents2. Make your fields sphinx attributes, so that sphinx knows what to store in it's indexes. For example if 'field1' is an integer, you should have a line in your sphinx config file like this: "sql_attr_uint = field1".See the sphinx documentation for more info.
Tom Ilsinszki

related questions