官术网_书友最值得收藏!

Chapter 2. Getting Started

Now that we have installed Sphinx, let's move forward and take a look at different search techniques and get acquainted with the different utilities Sphinx has to offer.

In this chapter we will take a dive into full-text search and look at different advantages of it. We will then see how Sphinx utilizes full-text search and also learn about indexer, search and searchd utilities that come along with Sphinx. We will also see a very basic example of how Sphinx works.

Note

Make sure that you have installed Sphinx using the steps mentioned in Chapter 1, Setting Up Sphinx before proceeding.

Checking the installation

Before we proceed any further, let's first check whether Sphinx was properly installed on our system. As we had used the --prefix configure option during installation, all Sphinx binaries and configuration files must have been placed in one single directory, that is, the one which was specified with --prefix.

We are assuming that you have installed Sphinx on a Linux machine. If everything went fine then a directory /usr/local/sphinx should have been created on your system. It should be structured in the same way as the following screenshot.

Note

I have used a Linux (Ubuntu 10.04) machine for all the examples shown in this book. Further, I presume that you have installed Sphinx with the configure option --prefix=/usr/local/sphinx

Checking the installation

You can see that we have a few binary files in bin directory and few configuration files in the etc directory. Then we have the var directory that will hold the actual index data and search logs. We will look at all of these in details in later chapters.

To test whether the Sphinx binary is working first change your directory to bin:

$ cd /usr/local/sphinx/bin 

Then issue the command./indexer:

Checking the installation

You can see that it outputs some information along with the version of Sphinx being installed, which in our case is 0.9.9.

The output above confirms that we are good to go, so let's move forward

主站蜘蛛池模板: 临沭县| 雷州市| 姚安县| 深圳市| 磐石市| 秦安县| 阿鲁科尔沁旗| 卢龙县| 和林格尔县| 安龙县| 汝南县| 揭东县| 弋阳县| 漯河市| 雅安市| 睢宁县| 灌云县| 洛浦县| 厦门市| 庄河市| 墨竹工卡县| 綦江县| 昌邑市| 佳木斯市| 温宿县| 兰坪| 永善县| 青神县| 松滋市| 浮梁县| 丰镇市| 湾仔区| 南部县| 桃江县| 黑河市| 诸暨市| 哈尔滨市| 当雄县| 阳谷县| 板桥市| 南宁市|