{"push_id":1970417375,"size":2,"distinct_size":1,"ref":"refs/heads/master","head":"e6fc2e7555a94ec5d767288ee8c364c0ee0ecb06","before":"503d4b566577898a91ff8f786ad2b8387f7d8de3","commits":[{"sha":"9fae5d679b73e1d08d61a509beed99c68d5f6689","author":{"name":"Clemens Wolff","email":"a28268be75c01b7c1a24e4b8b72ba24e647df033@microsoft.com"},"message":"Add option to filter results by namespace\n\nWe now have at least two data-sets in the featureService: Who's on First\nand Divipola. As such, we may want the ability to restrict results to\njust features from one of the two data-sets (e.g. in a Fortis deployment\nin Colombia we may want to only consider shapes from Divipola).\n\nThis change makes the assumption that we'll continue the current trend\nof prefixing all ids with the data source from where they came, so if an\nitem has an id 1234 and came from the Who's on First dataset, we'll give\nit an id like `wof-1234`. This is a reasonable pattern so it's fine to\nmake this assumption.\n\nAdding a computed index on the id column lets us query the namespace with a\nreasonable efficiency as the below query plan shows:\n\n```\nfeatures=# explain analyze select id from features where lower(split_part(id,'-',1))='divipola';\n\n                                                              QUERY PLAN\n----------------------------------------------------------------------------------------------------------------------------------------\n Bitmap Heap Scan on features  (cost=47.06..8406.97 rows=2405 width=13) (actual time=0.977..7.781 rows=5879 loops=1)\n   Recheck Cond: (lower(split_part((id)::text, '-'::text, 1)) = 'divipola'::text)\n   Heap Blocks: exact=1236\n   ->  Bitmap Index Scan on features_namespace_index  (cost=0.00..46.46 rows=2405 width=0) (actual time=0.849..0.849 rows=5879 loops=1)\n         Index Cond: (lower(split_part((id)::text, '-'::text, 1)) = 'divipola'::text)\n Planning time: 0.124 ms\n Execution time: 8.653 ms\n```","distinct":false,"url":"https://api.github.com/repos/CatalystCode/featureService/commits/9fae5d679b73e1d08d61a509beed99c68d5f6689"},{"sha":"e6fc2e7555a94ec5d767288ee8c364c0ee0ecb06","author":{"name":"Clemens Wolff","email":"3af45803e689e50f73311d164b157d1f134c9d3a@gmail.com"},"message":"Merge pull request #17 from CatalystCode/filter-namespace\n\nAdd option to filter results by namespace","distinct":true,"url":"https://api.github.com/repos/CatalystCode/featureService/commits/e6fc2e7555a94ec5d767288ee8c364c0ee0ecb06"}]}
{"actor":{"display_login":"c-w"}}