Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fusion Tables filter conditions OR

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 a creative way to solve the following:

I have a fusion table backed google map with hundreds of places and want to filter it to only places that have 'tags' or a 'title' containing a search parameter.

Ideally I could just use the following as my filter condition:

tags CONTAINS IGNORING CASE 'searchterm' OR title CONTAINS IGNORING CASE 'searchterm'

But the fusion table API simply doesn't allow it. So what to do? Make 2 separate queries, then filter out the duplicates? That means I can't use the nice FusionTablesLayer pre-rendered tile functionality.

What would you do?

like image 420
Tron Avatar asked May 03 '12 20:05

Tron


People also ask

What happens when data table are filtered?

Filtered data displays only the rows that meet criteria that you specify and hides rows that you do not want displayed.

Which function is used to filter data on specific conditions?

The FILTER function allows you to filter a range of data based on criteria you define. In the following example we used the formula =FILTER(A5:D20,C5:C20=H2,"") to return all records for Apple, as selected in cell H2, and if there are no apples, return an empty string ("").


1 Answers

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...

like image 150
Tron Avatar answered Sep 22 '22 00:09

Tron