Adding WHERE to HTTP request

Hi all,

We have very little experience with Sphinx/Manticore, so apologies if this is a bit of a noob question.

We can perform a request successfully with:

http://it-sphinx-server:9380/search?index=idx_masdatavendornames&match=@vendor_name “clemson and sons etc”/2&select=id,weight()&limit=5

But we want to limit the results by only those having a specific value in our ‘company_id’ sql_attr_uint.

We have tried the following but it doesn’t work:

How should we implement a WHERE clause?

Thank you.

Dont think can use /search endpoint, from the docs

Allows a simple full-text search, parameters can be :

  • index (index or list of indexes)
  • match (equivalent of MATCH())
  • select (as SELECT clause)
  • group (grouping attribute)
  • order (SQL-like sorting)
  • limit (equivalent of LIMIT 0,N)

… there is no ‘where’ param.

You’ll have to use the /sql endpoint, and specify it as a full SELECT SphinxQL query,

Okay, thanks Barry :slight_smile: