Questions tagged [sphinx]

Sphinx is a free software search engine for indexing database content. NOTE: For the Python documentation tool, use the [python-sphinx] tag.

Sphinx (SQL Phrase Index) is a standalone full-text search engine that provides efficient search functionality to third-party applications, especially SQL databases. This search engine was developed in 2001 by a Russian developer named Andrew Aksyonoff to guarantee a (1) good search quality, (2) performed at high speed (3) with a low resource consumption (Disk IO, CPU). It can be integrated with scripting languages such as Python and Java.

Sphinx is a free software search engine. It currently supports , , and ODBC-compliant databases as data sources natively. Other data sources can be indexed via a pipe in a custom format. It is distributed under the terms of the GNU General Public License version two or a proprietary license.

Starting from version 0.9.9, querying is possible using SphinxQL, a subset of SQL. Starting from version 1.10-beta, both incremental and batch indexing is supported.

Do not use this tag for the documentation tool written in Python; use for that.


External Resources

2436 questions
16
votes
4 answers

How gracefully restart Sphinx search daemon after reindexing

I've reindexed my Sphinx search with /usr/local/sphinx/bin/indexer --all --rotate and renamed my original index output files to something else. Simply changing the index argument passed to $sphinx->Query($query, $index); returns no results. I…
David Xia
  • 5,075
  • 7
  • 35
  • 52
16
votes
4 answers

Sphinx vs. MySql - Search through list of friends (efficiency/speed)

I'm porting my application searches over to Sphinx from MySQL and am having a hard time figuring this one out, or if it even needs to be ported at all (I really want to know if it's worth using sphinx for this specific case for…
Wonka
  • 8,244
  • 21
  • 73
  • 121
15
votes
1 answer

Sphinx PHP search

I'm doing a Sphinx search but turning up some really weird results. Any help is appreciated. So for example if I type "50", I get: 50 Cent 50 Lions 50 Foot Wave, etc. This is great, but when I search "50 Ce", I get: Ryczące…
James
  • 5,942
  • 15
  • 48
  • 72
14
votes
2 answers

php mysql fulltext search: lucene, sphinx, or?

This is admittedly similar to (but not a duplicate of) Comparison of full text search engine - Lucene, Sphinx, Postgresql, MySQL?, however what I am looking for are specific, supported, recommendations from the benefit of experience with more than…
Jonathan Fingland
  • 56,385
  • 11
  • 85
  • 79
12
votes
2 answers

Ordering items with matching tags by number of tags that match

I'm trying to figure out how to order items with matching tags by the number of tags that match. Let's say you have three MySQL tables: tags(tag_id, title) articles(article_id, some_text) articles_tags(tag_id, article_id) Now let's say you have…
Josh Smith
  • 14,674
  • 18
  • 72
  • 118
12
votes
2 answers

Sphinx How can i keep connection active even if no activity for longer time?

I was doing bulk inserts in the RealTime Index using PHP and by Disabling AUTOCOMIT , e.g. // sphinx connection $sphinxql = mysqli_connect($sphinxql_host.':'.$sphinxql_port,'',''); //do some other time consuming work //sphinx start…
user1642018
11
votes
2 answers

Problem in implementing Sphinx API along with Cake php

I am working on project where I need to implement SphinxSearch with Cake php. So I am simply trying to use a component and behaviour into it. The link to it, is…
Nishant Shrivastava
  • 2,113
  • 3
  • 26
  • 43
11
votes
1 answer

Sphinxql - How to use query having order by while using Sphinxql in PHP without using sphinxapi.php

i have been using mysql FTS , but recently switched to sphinx for testing purpose. installed sphinx on centos 7 Linux production 3.10.0-123.8.1.el7.x86_64 #1 GNU/Linux sphinx.conf source content_src1 { type = mysql sql_host …
user1642018
11
votes
2 answers

Error with configuring thinking sphinx and flying sphinx

I have Rails 3 application running on Heroku. I am using Thinking Sphinx search engine into my application. For making it work with Heroku, I have added a flying-sphinx gem to my gemfile as suggested in the Heroku docs. This is what I have in my…
Prajkta P
  • 111
  • 3
10
votes
2 answers

Using main and delta indexes in sphinx

Im switching fulltext searching on my site to sphinx. Im going to be using SphinxSE to perform the searches. I created 2 indexes, as specified in the manual: http://www.sphinxsearch.com/docs/manual-0.9.9.html#live-updates It seems to work, and index…
user15063
10
votes
2 answers

Sphinx Search Engine & Python API

I am trying to use Sphinx Search Engine with their Python API. The installation went fine. But when I use their Python API I do not get the complete result set. I only get the ID's? But when I use their ./search binary in ./bin I get the entire…
Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
10
votes
2 answers

Popularity decay algorithm for popular website posts

I'm looking for an algorithm to sort website results by popularity.. like Reddit's so the older a post the less power it's votes/score has. Here is the generally accepted solution as used by reddit: t = (time of entry post) - (Dec 8, 2005) x =…
antfx
  • 3,205
  • 3
  • 35
  • 45
10
votes
1 answer

Is this the right way to use Sphinx from PHP?

I am just starting with Sphinx. So far I got it installed successfully, got a table called profiles on my MySQL database indexed and am able to get the correct results back using the PHP API. I am using CodeIgniter so I wrapped the default PHP API…
user967451
9
votes
3 answers

How to erase a realtime index in Sphinx?

I want to use a realtime index as an instantly available delta for today's changes, so it needs to be erased nightly. Is there a nice way to remove all documents from an RT-index? I suppose I could select everything from it and issue a DELETE for…
Johnny Woo
  • 187
  • 1
  • 4
  • 10
9
votes
1 answer

How do I add the condition "IS NOT NULL" to a Thinking Sphinx search

I'm using Thinking Sphinx for full-text search, following this video. I'd like to do the following: @articles = Article.search(params[:search], :conditions => "published_at IS NOT NULL", :order => :created_at) The problem is that this doesn't work.…