Fusion Tables filter conditions OR

前端 未结 2 1217
轻奢々
轻奢々 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:29

    A possible answer is to pre-render the data within the table. Essentially add another column which is an aggregate of tags and title. Then I only need to query the one 'tags_or_titles' column. Of course this means more data munging beforehand when I export the data into the fusion table and doesn't feel so nice and clean...

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题