a SQL dialect that enables Sphinx search functionality in a standard SQL syntax.
Questions tagged [sphinxql]
120 questions
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
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
3
votes
0 answers
SphinxQL match this field OR this field
My database contains a table with a field called "tag".
I'd like to get all rows where "tag" field matches "white tiger" OR "brown lion".
I tried the following syntax but not working:
SELECT * FROM mytable WHERE MATCH('@tag white tiger|brown…

Aurelien
- 277
- 2
- 9
2
votes
1 answer
Sphinx Search how to use an empty before_match and after_match
Using Sphinx's SNIPPET() function, how can I remove any before_match and after_match from my query? I don't want anything wrapped around the matching text.
SNIPPET(field, 'word', 'after_match=""', 'before_match=""')
I've tried after_match="" but…

d-_-b
- 21,536
- 40
- 150
- 256
2
votes
1 answer
How to search by URL using Sphinx?
I have index in Sphinx. One of field in index is URL. And it contains for example next values:
(1) http://u24.ru/news/38417/v-centre-chelyabinska-muzhchina-popytalsya-pereplyt-reku?rss
(2)…

Nick
- 9,735
- 7
- 59
- 89
2
votes
2 answers
SphinxQL-Query-Builder. PHP Warning: Packets out of order. Expected 0 received 1. Packet size=0
I started Sphinx on 192.168.1.102:9312, and tried to run a query from my client machine:

Nick
- 9,735
- 7
- 59
- 89
2
votes
0 answers
sphinix search with custom field ordering with relevence
I'm using Sphinx QL for processing results. In my Sphinx Index there are numbers of fields like sub_cate_name, area_name, city_name and company_priority etc...
With my company priority field there were 1,2,3,4,5 priority into database. Company…

Naitik Patel
- 21
- 1
2
votes
1 answer
SphinxQL Order By Multiple Field
I use this library which basically is just a query builder.
The following query:
SELECT * FROM car_search ORDER BY car_model_name ASC, car_id DESC LIMIT 2;
Resulting in:
+------+----------------+---------------------+
| id | car_model_name | …

Samuel Adam
- 1,327
- 4
- 26
- 45
2
votes
1 answer
Sphinxql: several fields matching
String with author and his book is given. There are two fields in index: author and title. I need to find all books where author and title matches.
String may contain only author or only title, so I can't parse it. If I search
SELECT id FROM books…

Prokhor Sednev
- 668
- 7
- 14
2
votes
2 answers
multi_query not working in mysqli to update realtime sphinx index via sphinxql
We're using Sphinx realtime indexes and talking to them via PHP's mysqli driver. Single queries work fine, but we're trying to implement a batch update process using multi_query.
Queries look like this:
UPDATE rt SET rank = 1 WHERE id =…

Ty W
- 6,694
- 4
- 28
- 36
1
vote
1 answer
Sphinx and query for ranked results by first AND and then combinations of OR
I thought it is rather common case, but just can't figure out and find any info about it.
Say I have following texts:
Dogs hate cats
My cat eat mice but hate dogs
Mice hate cats but don't care about dogs
Giraffes don't care about any cat
Dogs are…

kerby
- 201
- 4
- 12
1
vote
0 answers
Sphinx MVA sql_attr_multi results always on first field in FACET Query
I am trying to achieve a filter in Sphinx so that I can filter out the results from two MVA attributes (what I need is a double condition, but since MVA is only 2 fields..) from the same joined table, but whatever I do, It seems that I keep getting…

Jordy
- 85
- 13
1
vote
1 answer
Sphinx - native (human) sort of strings
I am using Sphinx Search (http://sphinxsearch.com/) in combination with SphinxQL and need to sort by a string attribute:
I configured the attribute as sql_attr_string = myattribute.
Example query: SELECT * FROM myindex ORDER BY myattribute ASC;
The…

koseduhemak
- 523
- 2
- 4
- 19
1
vote
1 answer
building a dynamic query using where clause automatically changing numeric value to string type in SphinxQL query builder - laravel 5.4
$result is an array
$sphinx_ranked = SphinxQL::create($conn)->select('*')->from('jobs')->where('id', 'IN', $result)->execute();
after executing I got error
[1064] index jobs: unsupported filter type '(filter-type-6)' on @id [ SELECT * FROM jobs…

Joy
- 301
- 1
- 5
- 15
1
vote
1 answer
SphinxQL MATCH - how to use?
Explain to me please, what's the MATCH() operator in SphinxQL - how to use it?
Sorry if my question is stupid for somebody, but I really couldn't find any normal explanation in the Web of this.
For example, I have this request:
SELECT tid FROM…

Paul Basenko
- 895
- 1
- 9
- 22