• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 224  文章 - 41  trackbacks - 0
            <2010年10月>
            262728293012
            3456789
            10111213141516
            17181920212223
            24252627282930
            31123456

            享受編程

            常用鏈接

            留言簿(11)

            隨筆分類(159)

            隨筆檔案(224)

            文章分類(2)

            文章檔案(4)

            經(jīng)典c++博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

             
            CoreSeek可以說是一個簡單的搜索引擎,但是它并沒有提供完整搜索引擎中重要的爬蟲功能。CoreSeek提供中文全文索引/搜索,它基于Sphinx研發(fā)并獨立發(fā)布,在中文搜索和信息處理領(lǐng)域有不錯的表現(xiàn)。

            coreseek主要有兩個大的內(nèi)容,1.中文分詞LibMMSeg,2.全文索引/搜索Sphinx

            ubuntu 下的主要安裝和使用如下:
            可參考:http://www.coreseek.cn/products-install/install_on_bsd_linux/

            安裝ubuntu下需要的模塊:
            coreseek安裝需要預(yù)裝的軟件:
            apt-get install make gcc g++ automake libtool mysql-client libmysqlclient15-dev   libxml2-dev libexpat1-dev

            中文分詞 LibMMSeg 安裝:


            ##安裝coreseek開發(fā)的mmseg,為coreseek提供中文分詞功能
            $ cd mmseg-3.2.14
            ##ubuntu環(huán)境下,需要使用ACLOCAL_FLAGS="-I /usr/share/aclocal" ./bootstrap
            $ ./bootstrap
            $ ./configure --prefix=/usr/local/mmseg3
            $ make && make install
            ##如果提示libtool: unrecognized option `--tag=CC' ,請查看libtool問題解決方案
            ##安裝完成后,mmseg使用的詞典和配置文件,將自動安裝到/usr/local/mmseg3/etc中
            
            ##中文分詞測試,如果顯示不正常,請檢查當(dāng)前環(huán)境下的locale和UTF-8中文字符顯示設(shè)置
            $  /usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc src/t1.txt
                中文/x 分/x 詞/x 測試/x 
                中國人/x 上海市/x 
            
            Word Splite took: 1 ms.
            

            ##安裝coreseek:
            $ cd csft-3.2.14
            ##執(zhí)行configure,進(jìn)行編譯配置:
            $ sh buildconf.sh
            $ ./configure --prefix=/usr/local/coreseek --without-python --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --without-mysql
            $ make && make install
            
            支持mysql
            $ cd csft-3.2.14
            $ make clean
            $ ./configure --prefix=/usr/local/coreseek  --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql
            ##以上configure參數(shù)請正確拷貝,不要遺漏或者隨意修改
            $ make && make install
            
            現(xiàn)在兩部分已經(jīng)安裝成功了,接下來測試一下是否安裝成功。

            ##三、coreseek中文全文檢索測試
            
            $ cd testpack
            $  /usr/local/coreseek/bin/indexer -c etc/csft.conf
            ##以下為正常情況下的提示信息:
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                 using config file 'etc/csft.conf'...
                total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
                total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
            ##
            ##csft-4.0版顯示:ERROR: nothing to do.
            ##
            $  /usr/local/coreseek/bin/indexer -c etc/csft.conf --all
            ##以下為正常索引全部數(shù)據(jù)時的提示信息:(csft-4.0版類似)
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                 using config file 'etc/csft.conf'...
                indexing index 'xml'...
                collected 3 docs, 0.0 MB
                sorted 0.0 Mhits, 100.0% done
                total 3 docs, 7585 bytes
                total 0.075 sec, 101043 bytes/sec, 39.96 docs/sec
                total 2 reads, 0.000 sec, 5.6 kb/call avg, 0.0 msec/call avg
                total 7 writes, 0.000 sec, 3.9 kb/call avg, 0.0 msec/call avg
            
            $  /usr/local/coreseek/bin/indexer -c etc/csft.conf xml
            ##以下為正常索引指定數(shù)據(jù)時的提示信息:(csft-4.0版類似)
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                 using config file 'etc/csft.conf'...
                indexing index 'xml'...
                collected 3 docs, 0.0 MB
                sorted 0.0 Mhits, 100.0% done
                total 3 docs, 7585 bytes
                total 0.069 sec, 109614 bytes/sec, 43.35 docs/sec
                total 2 reads, 0.000 sec, 5.6 kb/call avg, 0.0 msec/call avg
                total 7 writes, 0.000 sec, 3.9 kb/call avg, 0.0 msec/call avg
            
            $  /usr/local/coreseek/bin/search -c etc/csft.conf
            ##以下為正常測試搜索時的提示信息:(csft-4.0版類似)
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                 using config file 'etc/csft.conf'...
                index 'xml': query '': returned 3 matches of 3 total in 0.093 sec
            
                displaying matches:
                1. document=1, weight=1, published=Thu Apr  1 22:20:07 2010, author_id=1
                2. document=2, weight=1, published=Thu Apr  1 23:25:48 2010, author_id=1
                3. document=3, weight=1, published=Thu Apr  1 12:01:00 2010, author_id=2
            
                words:
            
            
            $  /usr/local/coreseek/bin/search -c etc/csft.conf -a Twittter和Opera都提供了搜索服務(wù)
            ##以下為正常測試搜索關(guān)鍵詞時的提示信息:(csft-4.0版類似)
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                 using config file 'etc/csft.conf'...
                index 'xml': query 'Twittter和Opera都提供了搜索服務(wù) ': returned 3 matches of 3 total in 0.038 sec
            
                displaying matches:
                1. document=3, weight=24, published=Thu Apr  1 12:01:00 2010, author_id=2
                2. document=1, weight=4, published=Thu Apr  1 22:20:07 2010, author_id=1
                3. document=2, weight=3, published=Thu Apr  1 23:25:48 2010, author_id=1
            
                words:
                1. 'twittter': 1 documents, 3 hits
                2. '和': 3 documents, 15 hits
                3. 'opera': 1 documents, 25 hits
                4. '都': 2 documents, 4 hits
                5. '提供': 0 documents, 0 hits
                6. '了': 3 documents, 18 hits
                7. '搜索': 2 documents, 5 hits
                8. '服務(wù)': 1 documents, 1 hits
            
            $  /usr/local/coreseek/bin/searchd -c etc/csft.conf
            ##以下為正常開啟搜索服務(wù)時的提示信息:(csft-4.0版類似)
                Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
                Copyright (c) 2007-2010,
                Beijing Choice Software Technologies Inc (http://www.coreseek.com)
            
                using config file 'etc/csft.conf'...
                listening on all interfaces, port=9312
            ##如要停止搜索服務(wù),請使用/usr/local/coreseek/bin/searchd -c etc/csft.conf --stop
            ##如要已啟動服務(wù),要更新索引,請使用/usr/local/coreseek/bin/indexer -c etc/csft.conf --all --rotate
            
            ##然后,請參考csft-3.2.14下api目錄中的相關(guān)文件,使用PHP、Python、Ruby、Java來測試搜索服務(wù);也可以前往< ahref="/products-install/step_by_step/">搜索服務(wù)建立三步曲,查看第三步使用PHP測試。
            
            ##四、繼續(xù)
            ##通過以上步驟,coreseek已經(jīng)安裝測試完成,可以提供正常的xml數(shù)據(jù)源索引以及提供對應(yīng)的搜索服務(wù)了
            ##下一步工作,請查看手冊,準(zhǔn)備好mysql數(shù)據(jù)信息,以及進(jìn)行mysql數(shù)據(jù)源的測試,并在您的應(yīng)用中調(diào)用搜索服務(wù);mysql數(shù)據(jù)源的配置可參考testpack/etc/csft_mysql.conf文件
            

            這里要說明一下,coreseek支持兩種格式的搜索,可以搜索xml和mysql,上面測試的是使用xml。

            coreseek使用.csft來設(shè)置是那種搜索方式和搜索的一些配置信息,如mysql的數(shù)據(jù)庫和地址等。

            /usr/local/coreseek/binindexer -c etc/csft.conf --all
            是先為搜索引擎建立起索引得過程。
            /usr/local/coreseek/bin/search -c etc/csft.conf -a Twittter和Opera都提供了搜索服務(wù)
            
            則是在文檔中搜索
             Twittter和Opera都提供了搜索服務(wù)
            
            的內(nèi)容。
            
            這樣命令端的搜索搜索就可以簡單的建立了。
            posted on 2011-05-23 13:21 漂漂 閱讀(1859) 評論(0)  編輯 收藏 引用 所屬分類: ubuntu 編程
            伊人久久无码精品中文字幕| 久久这里只有精品久久| 手机看片久久高清国产日韩| 国产一区二区久久久| 综合人妻久久一区二区精品| 久久这里只有精品18| 国产成人精品久久亚洲| 亚洲精品蜜桃久久久久久| 伊人久久综合热线大杳蕉下载| 人妻丰满?V无码久久不卡| 久久精品国产亚洲精品2020| 色婷婷狠狠久久综合五月| 亚洲伊人久久精品影院| 久久亚洲av无码精品浪潮| 久久久噜噜噜www成人网| 一级女性全黄久久生活片免费 | 久久九九青青国产精品| 无夜精品久久久久久| 久久精品国产91久久麻豆自制| 亚洲色欲久久久久综合网| 国产A级毛片久久久精品毛片| 久久精品亚洲精品国产色婷 | 久久夜色精品国产欧美乱| 久久久精品人妻无码专区不卡| 久久天天躁狠狠躁夜夜网站| 伊人久久亚洲综合影院| 精品熟女少妇aⅴ免费久久| 色偷偷888欧美精品久久久| 99久久超碰中文字幕伊人| 亚洲精品白浆高清久久久久久 | 国产亚洲色婷婷久久99精品91| 久久久久人妻一区精品色| 亚洲精品蜜桃久久久久久| 亚洲国产另类久久久精品| 人妻无码精品久久亚瑟影视| 亚洲伊人久久综合影院| 无码八A片人妻少妇久久| 狠狠综合久久AV一区二区三区| 国产成人无码精品久久久性色| 久久笫一福利免费导航 | 久久青青草原国产精品免费|