php full-text search engine - News search using

I believe many of my friends met, scenarios require full-text search, Baidu in a circle found a xunsearch 

First collected 10,000 local paper, the efficiency can also be found.

Use is also very simple, direct on the code

Receiving a keyword //
$ new new XS XS = ( 'xphp');
// index = $ $ XS-> index; // Get index object
$ = $ XS- Search> Search;
$ COUNT = $ Search-> setQuery ( keyword $) -> COUNT ();
$ psize = 30;

// get the search target
$ Search-> setLimit ($ psize);
$ docs = $ Search-> setQuery ($ keyword) -> Search ();
// print_r ($ docs); die;

Of course the premise is that the server must be a Linux system, install the extension xunsearch, open the extension on the server, but also to import data to generate the index.

Seemingly ready to work a little more complex, specific information search official website detailed documentation.

According to the efficiency of the full-text search, grabbed 300,000 articles into my station  www.df5d.com    search found that the efficiency can still be pricey   

So the list of directories, search list, with all the information found true. . . Estimated that the base is not big enough, need to test millions-level data amount of search efficiency!

 

Guess you like

Origin www.cnblogs.com/fuyifan/p/11850863.html