Guide to using Sphinx with PHP and MySQL

后端 未结 4 1223
面向向阳花
面向向阳花 2020-12-23 10:36

I\'m looking for a complete guide to using Sphinx with PHP and MySQL. I\'d like one that\'s a bit simpler and easygoing than the one provided on the site.

I\'m look

4条回答
  •  时光说笑
    2020-12-23 10:57

    I'm not too sure about a good guide but here are my steps.

    a) Download and install it's quite straightforward

    b) Make your first index - you need a source a location the given config is very good remember you can use a primary source to config all the main areas and then other sources stem off from that. Each source should start with the primary key and I find it works best to do key_id AS id

    c) Test you index using the search

    d) Start your search demon for sphinx - searchd this is what php will connect to and how it gets your results.

    e) Make a function to search all indexes pass in the index you want to search and it will return the ids in an array that have matched your search

    f) Make a delta and updates.

    Job done - the sphinx forum is very nice and should provide you if you need any help. Richard

提交回复
热议问题