Windows下安装使用Sphinx
1. 从http://sphinxsearch.com 下载Sphinx 2.0.1-beta
2. 解压缩到合适目录(这里以d:\shpinx为例)
3. 建立配置文件
Sphinx包默认附带sphinx.conf.in,sphinx-min.conf.in,example.sql例子,我们完全可以从
sphinx-min.conf.in复制出一个sphinx.conf用来测试。
修改sphinx.conf必要项(数据库作为数据源):mysql数据库连接项(参照example.sql建立测试数据到数据库);@CONFDIR@替换成实际目录,然后手动建立好该目录及子目录,这里为
d:\sphinx\data # 索引数据目录
d:\sphinx\log # 进程文件目录
4. 安装Sphinx到Windows服务
searchd.exe --install -c d:\sphinx\sphinx.conf --servicename SphinxSearch
启动该服务
5. PHP客户端测试
进入d:\sphinx\api目录,sphinx提供了php, python , ruby , c等客户端代码,如果Php程序员想访问Sphinx,包含sphinxapi.php就可以了 ,test.php是Sphinx提供的访问例子。
在测试之前,需要生成索引文件到d:\shpinx\data目录,进入d:\sphinx\bin执行
indexer.exe -c d:\sphinx\sphinx.conf --all
运行成功后必须重新启动Sphinx才能生效。重启后执行test.php
php test.php test

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Huawei is rolling out software version 5.0.0.100(C00M01) for the Watch GT 5 and the Watch GT 5 Prosmartwatchesglobally. These two smartwatches recently launched in Europe, with the standard model arriving as the company’s cheapest model. This Harmony

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

CMS stands for Content Management System. It is a software application or platform that enables users to create, manage, and modify digital content without requiring advanced technical knowledge. CMS allows users to easily create and organize content

PHP provides tools to allow websites to easily integrate social media functions: 1. Dynamically generate social media sharing buttons for users to share content; 2. Integrate with the OAuth library to achieve seamless social media login; 3. Use the HTTP library to capture social media Data, obtain user profile, posts and other information.
