Sphinx Unknown key name 'WHERE'

php, sphinx

Solution

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

Problem

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

Original source