Fusion Tables filter conditions OR

前端 未结 2 1230
轻奢々
轻奢々 2020-12-20 23:43

According to https://developers.google.com/fusiontables/docs/developers_reference OR operations are not allowed as part of filter conditions. So I\'m trying to come up with

2条回答
  •  醉酒成梦
    2020-12-21 00:43

    How about adding a column to your table called "Show_In_Results",

    then running two separate queries to update that column for each row of data based on whether the search term is found in the specific column or not.

    UPDATE 'table_id'
    SET Show_In_Results = 1
    
    UPDATE 'table_id'
    SET Show_In_Results = 1
    WHERE tags CONTAINS IGNORING CASE 'searchterm' 
    
    UPDATE 'table_id'
    SET Show_In_Results = 1
    WHERE title CONTAINS IGNORING CASE 'searchterm' and Show_In_Results <> 1
    

    Then when you render your map layer:

    SELECT 'columns' FROM 'table_id' WHERE Show_In_Results = 1
    

提交回复
热议问题