Questions tagged [sphinxql]

a SQL dialect that enables Sphinx search functionality in a standard SQL syntax.

120 questions
0
votes
1 answer

Searching for empty string in SphinxQL

I have a string field 'extra_data' in Sphinx index, which has data in comma-separated format (ex. 'green', 'red', 'green,red', ...). And I need to select to find rows: 1. extra_data is 'green' 2. or extra_data is 'red' 3. or extra_data is empty So I…
mikatakana
  • 503
  • 9
  • 22
0
votes
2 answers

mysqli cant set encoding

i've been trying to set encoding for mysql connection to utf8 $conn = mysqli_init(); $conn->real_connect("127.0.0.1", null, null, null, 9306, null); $conn->set_charset('utf8'); var_dump($conn->get_charset());die but it's still…
versh23
  • 149
  • 2
  • 12
0
votes
1 answer

Sphinxql - filtering with having

I'm trying to filter query with HAVING but all I get this error: mysql> SELECT id FROM related_tags GROUP BY application_id HAVING COUNT(*)=10; ERROR 1064 (42000): sphinxql: syntax error, unexpected IDENT, expecting $end near 'HAVING…
user308738
0
votes
1 answer

Sphinx different results with MATCH

So, I have a situation where I want both no MATCH and MATCH all items to get me the same results, but have been getting inconsistent results. These are the current types in the DB: mysql> select the_type from data GROUP BY…
mumia
  • 83
  • 1
  • 10
0
votes
1 answer

SphinxSearch: complex having statement

I have table person_content with next columns: person_id INT content_id INT is_star BOOL I need to select all persons, who are related to more than N content_ids or has is_star flag, using SphinxQL. The first part of my problem can be solved…
Tural Gurbanov
  • 742
  • 2
  • 7
  • 27
0
votes
2 answers

Sphinx correctly match json array with all values

I'm trying to match rows that have json arrays that contain all given elements. Example search items: ['gym', 'sofa'] Expected rows matched: ['gym', 'sofa'] ['gym', 'sofa', 'bed'] ['pool', 'gym', 'sofa'] ['pool', 'gym', 'sofa', 'bed'] Should not…
mumia
  • 83
  • 1
  • 10
0
votes
1 answer

Sphinx mysql " WHERE IN " for string colums

Is there any way to perform the following query in sphinx index. SELECT * FROM search_index WHERE MATCH('sea*') AND object_type IN ('news', 'videos') LIMIT 0, 7 This query doesnt work and throw the following error sphinxql: syntax error,…
Marty Aghajanyan
  • 12,651
  • 8
  • 35
  • 37
0
votes
1 answer

SphinxQL builder get total_found

I am using SphinxQL build with zend db style queries sphinx, it works great. https://github.com/FoolCode/SphinxQL-Query-Builder I am trying to figure out how to get total_found number from the query. I try SphinxQL::create($this->conn)->query('SHOW…
user1377324
  • 165
  • 2
  • 14
0
votes
1 answer

Sphinx - weigh results by the value of a field

I have a large table with the columns name, phone number, and type of relationship to me (friend, family, acquaintance, etc.). When I search a name in Sphinx I want the results with the field value "family" to be weighted higher than "acquaintance."…
user3038754
  • 185
  • 4
  • 11
0
votes
1 answer

Replacement for 'OR' in SphinxQL

I'm currently trying to integrate Sphinx search engine into Python application. The problem is that SphinxQL doesn't support OR clause as common SQL does. There are some hacks to use, like writing expressions in SELECT like this: SELECT id,(field1 =…
Ilya Khaustov
  • 328
  • 1
  • 6
  • 21
0
votes
1 answer

How to add Matching Modes in Sphinxql query builder

here is my query Sphinxql query $query =SphinxQL::query()->select('*') ->from('table1')->match('title','hel',)->execute(); //title is column name I need a records having the text hel anywhere for eg mysql Like %string% In above its…
Mahendra Jella
  • 5,450
  • 1
  • 33
  • 38
0
votes
1 answer

How to set Matching Modes in SPhinxql query builder

This is my query $query =SphinxQL::query()->select('*') ->from('property_table')->match('property_title','Plo',)->execute(); //property_title is column name Not retrieving the records with the data 'Plo' I need a records which is having the…
0
votes
1 answer

Records not deleted from SphinxQL

while executing the below query i am getting error. can any one please , suggest to fix that issue delete from RTindexname where dateupdated > 1397063119 and dateupdated < 1397056434; sphinxql: syntax error, unexpected IDENT, expecting ID near…
karthik
  • 36
  • 10
0
votes
1 answer

SphinxQL support for inner join on the same index with subquery

I wish to do inner join a the same index in SphinxQL select * from my_index w inner join (select test_id,max(val1) from my_index where match('xxxx') group by test_id) as w2 on w.test_id=w2.test_id and w.val1=w2.val1; but it's getting syntax…
user121196
  • 30,032
  • 57
  • 148
  • 198
0
votes
1 answer

Filtering sphinxql group by query by count

Does anybody know how filter sphinxql group by query by count? For example I have query like: SELECT collection_id, count(*) as cnt FROM mobile_content WHERE collection_id != 0 GROUP BY collection_id And I want to take to result only rows that…
Tural Gurbanov
  • 742
  • 2
  • 7
  • 27