Sphinx在window下的初步安裝和配置_PHP教程

來源:互聯網
上載者:User
  前幾天在網上找安裝sphinx的資料,沒有找到很全面的,不是這走不通就是那不通,今天總算整出來了,整理一下。

  1. windows Win32 release binaries with MySQL support D:/sphinx

  2. D:/sphinx/ data log D:/sphinx/sphinx.conf.in D:/sphinx/bin/sphinx.conf

  3.配置在這就不多說了,網上很多,而且這一步基本都是對的

  4. sql D:/sphinx/example.sql (這應該不難)

  5.

  D:/sphinx/bin>indexer.exe test1 ( :test1 索引名, sphinx.conf index test1(),關於這個,我剛開始看到的是在這運行indexer.exe -all,但是會報錯,後來看到這個indexer.exe test1,運行,成功 )

  

  6. ’test’

  D:/sphinx/bin>search.exe test

  :

  

  7.

test documents

  UPDATE `test`.`documents` SET `title` = ‘ ’, `content` = ‘this is my test document number two ’ WHERE `documents`.`id` = 2;

  D:/sphinx/bin>indexer.exe test1

’ ’

  D:/sphinx/bin>search.exe

  

windows gbk 。我們可以用程式試試,在D:/sphinx/api foo.php utf-8

  

Sphinx searchd

  D:/sphinx/bin>searchd.exe  

  

  

Searchd.exe --install --Config d:/sphinx/bin/sphinx.conf

PHP ):

http://www.test.com/sphinx/api/foo.php ( )

  頁面中就會輸出找到的資訊了,其中一部分是:

  

  看到了嗎,它將“中文”分成2個字了,呵呵,這是因為我們還沒用中文分詞,它只能一個一個字的處理了,關於中文分詞和其它進階配置以後再講吧。

  到此sphinx基本就可以簡單運行了!

http://www.bkjia.com/PHPjc/440386.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/440386.htmlTechArticle前幾天在網上找安裝sphinx的資料,沒有找到很全面的,不是這走不通就是那不通,今天總算整出來了,整理一下。 1. windows Win32 release bina...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.