How could I use FQL to query all the events without using indexable column which is marked *

前端 未结 1 1079
青春惊慌失措
青春惊慌失措 2020-12-18 08:53

I have a problem to solve.
I want to query all the events and I want to find the specific string.

The FQL code is like the following:

SELEC

相关标签:
1条回答
  • 2020-12-18 09:31

    Well, the error message is clear:

    Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql

    So simply your approach won't work.

    EDIT:
    To further explain why this is not possible:

    Facebook deals with "over than 900 million objects that people interact with (pages, groups, events and community pages)". reference.

    So basically giving you (all App devs) the ability to search ALL pages, events, groups...etc will definitely bring the system down. This is why these "indexible" fields are selected carefully.

    For instance, if you want to search events by "location" then these events should be "somehow" related to your application. Like created by your App for example, and you should have their ids stored somewhere so that something like this would work:

    SELECT eid, name, location, start_time, end_time FROM event WHERE
    strpos(lower(location),'test') >=0 AND eid IN (ids_from_your_db)
    
    0 讨论(0)
提交回复
热议问题