Home php教程 php手册 解析coreseek for sphinx的使用

解析coreseek for sphinx的使用

Jun 13, 2016 am 11:46 AM
coreseek for sphinx download use Will of Unzip parse

1.将下载下来的文件包解压,重新命名为sphinx或者其他。然后放到一个比较合适的位置,一般放到d盘根目录下面。
2.找到D:\sphinx\etc里面的csft_mysql.conf这个文件,打开它,推荐用ue或者editplus。因为记事本打开会没有样式。这是因为在linux下面的文件的缘故。
3.做必要的修改。因为这个修改因表不同和你想要取的内容不同,这里就没有标准的,只能给个实例我的修改是这样的:

复制代码 代码如下:


#源定义
source main
{
 type     = mysql
 sql_host    = 192.168.1.250
 sql_user    = root
 sql_pass    = 123456
 sql_db     = db_youxue
 sql_port    = 3306

 sql_query_pre   = SET NAMES utf8
 sql_query_pre                   = set SESSION query_cache_type = OFF #我加的
 sql_query_pre                   = replace into sph_counter select 1,max(Fid) from t_store   #我加的

 sql_query   = SELECT Fid, Ftitle, Fcontent, Fprovince,Fexamtitle, UNIX_TIMESTAMP(Fcreatetime) AS Fcreatetime FROM t_store where Fid           #sql_query第一列id需为整数
           #title、content作为字符串/文本字段,被全文索引
 sql_attr_uint   = Fid   #从SQL读取到的值必须为整数
 sql_attr_timestamp  = Fcreatetime      #从SQL读取到的值必须为整数,作为时间属性
 sql_query_info   = SELECT * FROM t_store WHERE Fid=$id  #命令行查询时,从数据库读取原始数据信息
}
#index定义
index main
{
 source   = main             #对应的source名称
 path   = var/data/mysql
 docinfo   = extern
 mlock   = 0
 morphology  = none
 min_word_len  = 1
 html_strip    = 0
 #charset_dictpath = /usr/local/mmseg3/etc/ #BSD、Linux环境下设置,/符号结尾
 charset_dictpath = etc/      #Windows环境下设置,/符号结尾
 charset_type  = zh_cn.utf-8
}
#全局index定义
indexer
{
 mem_limit   = 128M
}
#searchd服务定义
searchd
{
    listen                  =   9312
 read_timeout  = 5
 max_children  = 30
 max_matches   = 1000
 seamless_rotate  = 0
 preopen_indexes  = 0
 unlink_old   = 1
 pid_file = var/log/searchd_mysql.pid
 log = var/log/searchd_mysql.log
 query_log = var/log/query_mysql.log
}
source deltaMain: main
{
 sql_query_pre = set names utf8
 sql_query = SELECT Fid, Ftitle, Fcontent, Fprovince,Fexamtitle, UNIX_TIMESTAMP(Fcreatetime) AS Fcreatetime FROM t_store where Fid>(select Fmaxid from sph_counter where Fid=1)
}
index deltaMain: main
{
 source = deltaMain
 path   = var/data/delta
}


这样配置就可以了。
4.在命令行里面找到sphinx的目录。然后输入:
bin\indexer -c etc\csft_mysql.conf
回车,这个是生成新的索引。

5.再输入:
bin\indexer -c etc\csft_mysql.conf --all
回车,如果这里数据大的话会等待些时间。一般10000条20秒吧。反正没有官方说的快。再输入:
bin\searchd -c etc\csft_mysql.conf --console 回车启动searchd服务。这个时候可以在任务管理器的进程中找到这个searchd服务。这样就具备了查询的基本条件了。

6.输入:
bin\searchd -c etc\csft_mysql.conf -a document
回车,意思是搜索包含document的所有匹配项。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if I download other people's wallpapers after logging into another account on wallpaperengine? What should I do if I download other people's wallpapers after logging into another account on wallpaperengine? Mar 19, 2024 pm 02:00 PM

When you log in to someone else's steam account on your computer, and that other person's account happens to have wallpaper software, steam will automatically download the wallpapers subscribed to the other person's account after switching back to your own account. Users can solve this problem by turning off steam cloud synchronization. What to do if wallpaperengine downloads other people's wallpapers after logging into another account 1. Log in to your own steam account, find cloud synchronization in settings, and turn off steam cloud synchronization. 2. Log in to someone else's Steam account you logged in before, open the Wallpaper Creative Workshop, find the subscription content, and then cancel all subscriptions. (In case you cannot find the wallpaper in the future, you can collect it first and then cancel the subscription) 3. Switch back to your own steam

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

How to download links starting with 115://? Download method introduction How to download links starting with 115://? Download method introduction Mar 14, 2024 am 11:58 AM

Recently, many users have been asking the editor, how to download links starting with 115://? If you want to download links starting with 115://, you need to use the 115 browser. After you download the 115 browser, let's take a look at the download tutorial compiled by the editor below. Introduction to how to download links starting with 115:// 1. Log in to 115.com, download and install the 115 browser. 2. Enter: chrome://extensions/ in the 115 browser address bar, enter the extension center, search for Tampermonkey, and install the corresponding plug-in. 3. Enter in the address bar of 115 browser: Grease Monkey Script: https://greasyfork.org/en/

How to download Quark network disk to local? How to save files downloaded from Quark Network Disk back to the local computer How to download Quark network disk to local? How to save files downloaded from Quark Network Disk back to the local computer Mar 13, 2024 pm 08:31 PM

Many users need to download files when using Quark Network Disk, but we want to save them locally, so how to set this up? Let this site introduce to users in detail how to save files downloaded from Quark Network Disk back to the local computer. How to save files downloaded from Quark network disk back to your local computer 1. Open Quark, log in to your account, and click the list icon. 2. After clicking the icon, select the network disk. 3. After entering Quark Network Disk, click My Files. 4. After entering My Files, select the file you want to download and click the three-dot icon. 5. Check the file you want to download and click Download.

Introduction to how to download and install the superpeople game Introduction to how to download and install the superpeople game Mar 30, 2024 pm 04:01 PM

The superpeople game can be downloaded through the steam client. The size of this game is about 28G. It usually takes one and a half hours to download and install. Here is a specific download and installation tutorial for you! New method to apply for global closed testing 1) Search for "SUPERPEOPLE" in the Steam store (steam client download) 2) Click "Request access to SUPERPEOPLE closed testing" at the bottom of the "SUPERPEOPLE" store page 3) After clicking the request access button, The "SUPERPEOPLECBT" game can be confirmed in the Steam library 4) Click the install button in "SUPERPEOPLECBT" and download

Where to download files from Quark Network Disk_How to download Quark Network Disk to local area and share Where to download files from Quark Network Disk_How to download Quark Network Disk to local area and share Mar 21, 2024 pm 03:57 PM

As a convenient and practical network disk tool, Quark can help users easily obtain their favorite resources. What if you want to download a file locally? Let the editor tell you now, let’s learn it together! How to download Quark Network Disk to local sharing method 1. First open the Quark software, enter the homepage, and click the [Cloud Icon] on the lower right; 2. Then on the Quark Network Disk page, we click the [Document] function; 3. Then go to the document page, select the file you want to download, and click the [three-dot icon]; 4. After the final click, we click [Download] in the pop-up dialog box;

How to download foobar2000? -How to use foobar2000 How to download foobar2000? -How to use foobar2000 Mar 18, 2024 am 10:58 AM

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

What should I do if I can't find the decompression option when I right-click on the rar file? What should I do if I can't find the decompression option when I right-click on the rar file? Mar 13, 2024 pm 07:07 PM

How to decompress rar files downloaded from the Internet? Under normal circumstances, you can just right-click and select Extract. However, some users right-click and find that they cannot find the decompression option. What is going on? In fact, it is caused by everyone not making relevant settings for the winrar software. You just need to make settings. The specific steps are as follows: 1. First, we open "winrar" on the computer. 2. Select "Options" in the toolbar and click "Settings". 3. Then select the "Integration" option above, and click "Context Menu Item" after entering. 4. At this time

See all articles