Reputation: 153
I'm trying to search for a company's different branches using a partial string. Here's the query I'm using:
SELECT name, location, fan_count, talking_about_count, were_here_count FROM page WHERE strpos(name, "Applebee's") >= 0 OR (name < 0)
I get the error:
Your statement is not indexable. The WHERE clause must contain an indexable column.
Name is listed as indexable, so I'm not sure why this error is occurring.
Upvotes: 1
Views: 2179
Reputation: 1054
You can use function CONTAINS()
:
SELECT name, location, fan_count, talking_about_count, were_here_count FROM page WHERE CONTAINS("Applebee's") and strpos(name, "Applebee's") >=0
This query will output all results which will contain Applebee's in name.
Upvotes: 2