Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sphinx Unknown key name 'WHERE'

Tags:

php

sphinx

I'm trying to index on non soft-deleted records in Sphinx:

source users : base
{
    sql_query       = \
        SELECT Id, Name, Transport, Deleted \
        FROM profiles \
        WHERE Deleted IS NULL

    sql_attr_uint = Transport
}

My index for this source works absolutely fine returning all records required, until I add the WHERE statement:

ERROR: unknown key name 'WHERE' in path/to/sphinx.conf line 22 col 8

I have WHERE statements in other sources that work as intended, but it seems none work when I try with Deleted IS NULL.

Does anyone have any ideas about what the problem may be? Is it better to filter on Deleted from within my source code?

I should note that I'm developing on Windows, so this is running as a Windows service.

Thanks

like image 297
James Avatar asked Jan 28 '26 04:01

James


1 Answers

My guess is you have a space after the slash on the line before...

like image 125
barryhunter Avatar answered Jan 29 '26 20:01

barryhunter