Archive

Archive for the ‘SPHINX’ Category

MySQL Performance Blog recommends SPHINX

September 13, 2009 Leave a comment

The post have been moved to new URL http://www.infotales.com/sphinx-recommended-mysql-performance-blog/

For more SPHINX related posts keep visiting my new blog

Categories: MySQL, SPHINX Tags: , , ,

Distributed searching with SPHINX

September 9, 2009 2 comments

The post have been moved to new URL http://www.infotales.com/sphinx-distributed-searching/

For more SPHINX related posts keep visiting my new blog

SetGroupBy accuracy in Sphinx

August 2, 2009 2 comments

In this post we will be looking at grouping results in sphinx, for other thing you can do with sphinx like searching, sorting etc see the documentation on sphinxsearch.com.

It is possible with sphinx to Group results as we do in MySQL Group By. For example if you need to search in different articles posted by different user it is possible that results contain more than one article from same user. If we need exactly only one result per user it will be done by Grouping.

When grouping the number of result returned may be not accurate. This is caused by limited number of ram allowed to actually sort and group results. In sphinx documentation it is said

WARNING: grouping is done in fixed memory and thus its results are only approximate; so there might be more groups reported in total_found than actually present. @count might also be underestimated.

If you need exact count of grouped results you will need to increase max_matches. If max_matches allows to store all found groups, results will be 100% accurate.

The max_matches can be set in sphinx.conf file. You can also set this value through API call SetLimits. The PHP API has limit of 1000 max_matches by default so if you need to increase the value you will have to set by changing the line

$this->_maxmatches = 1000;

in sphinxapi.php file.

Remember that you can not set value higher then defined in API or index.

Happy Searching with sphinx search.

Introduction to Sphinx Search

July 9, 2009 5 comments

The post have been moved to new URL http://www.infotales.com/introduction-to-sphinx-search/

For more SPHINX related posts keep visiting my new blog

Categories: MySQL, SPHINX Tags: , , ,

Sorting and GroupBy on text field in SPHINX

Recently I encountered a problem where we had to use GroupBy on a field which at string value. As you know at the moment sphinx dose not support string attributes.

The solution is simple one and provided by sphinx it self. Use attribute type sql_attr_str2ordinal in this way you can perform sort or GroupBy on string values.

more information can be found here

For people who don’t know what sphinx: sphinx (SQL Pharase Indexer) is opensource, free, power full fultext search indexer and search engine, in fact its more than that. To know more about sphinx click here

Categories: SPHINX Tags:
Follow

Get every new post delivered to your Inbox.