string(130) "select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' co','co')" array(1) { [0]=> array(3) { ["string"]=> string(2) "co" ["words"]=> array(1) { [0]=> string(2) "co" } ["wordsets"]=> array(1) { [0]=> array(1) { [0]=> string(2) "co" } } } } array(2) { [" co"]=> array(4) { [0]=> array(8) { ["word_id"]=> string(7) "1177659" ["word_token"]=> string(3) " co" ["word"]=> string(2) "co" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } [1]=> array(8) { ["word_id"]=> string(8) "15955527" ["word_token"]=> string(3) " co" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> string(2) "co" ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } [2]=> array(8) { ["word_id"]=> string(8) "15968966" ["word_token"]=> string(3) " co" ["word"]=> NULL ["class"]=> string(5) "place" ["type"]=> string(6) "county" ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } [3]=> array(8) { ["word_id"]=> string(8) "16008262" ["word_token"]=> string(3) " co" ["word"]=> NULL ["class"]=> string(7) "landuse" ["type"]=> string(5) "grass" ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["co"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(4) "1771" ["word_token"]=> string(2) "co" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(6) "270352" } } } array(2) { [1]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(1) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [1177659]=> string(7) "1177659" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> float(10.361465) ["fLon"]=> float(-84.476996666667) ["fRadius"]=> float(0.1) } [1]=> array(16) { ["iSearchRank"]=> int(1) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> string(2) "co" ["aName"]=> array(0) { } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> float(10.361465) ["fLon"]=> float(-84.476996666667) ["fRadius"]=> float(0.1) } } [2]=> array(3) { [0]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(0) { } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(4) "near" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(7) "landuse" ["sType"]=> string(5) "grass" ["sHouseNumber"]=> string(0) "" ["fLat"]=> float(10.361465) ["fLon"]=> float(-84.476996666667) ["fRadius"]=> float(0.1) } [1]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=> array(0) { } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(1) { [1771]=> string(4) "1771" } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> float(10.361465) ["fLon"]=> float(-84.476996666667) ["fRadius"]=> float(0.1) } [2]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(0) { } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(4) "near" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(5) "place" ["sType"]=> string(6) "county" ["sHouseNumber"]=> string(0) "" ["fLat"]=> float(10.361465) ["fLon"]=> float(-84.476996666667) ["fRadius"]=> float(0.1) } } }
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
1# co(1177659)#10.361465-84.4769966666670.1
1co10.361465-84.4769966666670.1
2nearlandusegrass10.361465-84.4769966666670.1
2#co(1771)#10.361465-84.4769966666670.1
2nearplacecounty10.361465-84.4769966666670.1

Search Loop, group 1, loop 1
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
1# co(1177659)#10.361465-84.4769966666670.1
string(442) "select place_id from search_name where name_vector @> ARRAY[1177659] and ST_DWithin(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), 0.1) order by ST_Distance(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326)) ASC, ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), centroid) asc, (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 2"
Place IDs: array(0) { }
Search Loop, group 1, loop 2
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
1co10.361465-84.4769966666670.1
string(432) "select place_id from search_name where country_code = 'co' and ST_DWithin(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), 0.1) order by ST_Distance(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326)) ASC, ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), centroid) asc, (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 2"
Place IDs: array(0) { }
Search Loop, group 2, loop 3
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
2nearlandusegrass10.361465-84.4769966666670.1
string(409) "select place_id from search_name where ST_DWithin(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), 0.1) order by ST_Distance(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326)) ASC, ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), centroid) asc, (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 50" string(521) "select min(rank_search) from placex where place_id in (8326150,5990796115,5990796545,5990796544,3670718864,3670718589,40121621,88567293,89449003,88975223,89359856,88407220,18252874,88240453,88601958,6007392614,18825928,89505177,6007410734,6007410762,88241447,3670718872,59616725,4242317,11218392,11493810,61918120,11124290,61937070,17450953,18036658,18459061,17451990,16813568,17486088,77264143,77264152,16571292,17155507,16561252,77927007,78308055,41061067,78148514,93953687,76899756,76968080,78001707,78148532,19591610)" string(534) "select place_id from placex where place_id in (8326150,5990796115,5990796545,5990796544,3670718864,3670718589,40121621,88567293,89449003,88975223,89359856,88407220,18252874,88240453,88601958,6007392614,18825928,89505177,6007410734,6007410762,88241447,3670718872,59616725,4242317,11218392,11493810,61918120,11124290,61937070,17450953,18036658,18459061,17451990,16813568,17486088,77264143,77264152,16571292,17155507,16561252,77927007,78308055,41061067,78148514,93953687,76899756,76968080,78001707,78148532,19591610) and rank_search < 23" string(369) "select distinct l.place_id,ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), l.centroid) from place_classtype_landuse_grass as l,placex as f where f.place_id in (4242317,3670718864,61937070,61918120,8326150) and ST_DWithin(l.centroid, f.centroid, 0.05) order by ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), l.centroid) asc limit 2"
Place IDs: array(0) { }
Search Loop, group 2, loop 4
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
2#co(1771)#10.361465-84.4769966666670.1
string(408) "select place_id from search_name where ST_DWithin(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), 0.1) order by ST_Distance(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326)) ASC, ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), centroid) asc, (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 2"
Place IDs: array(2) { [0]=> string(7) "8326150" [1]=> string(10) "5990796115" }
Search Loop, group 2, loop 5
rankName TokensName NotAddress TokensAddress Notcountryoperatorclasstypehouse#LatLonRadius
2nearplacecounty10.361465-84.4769966666670.1
string(409) "select place_id from search_name where ST_DWithin(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), 0.1) order by ST_Distance(centroid, ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326)) ASC, ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), centroid) asc, (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 50" string(521) "select min(rank_search) from placex where place_id in (8326150,5990796115,5990796545,5990796544,3670718864,3670718589,40121621,88567293,89449003,88975223,89359856,88407220,18252874,88240453,88601958,6007392614,18825928,89505177,6007410734,6007410762,88241447,3670718872,59616725,4242317,11218392,11493810,61918120,11124290,61937070,17450953,18036658,18459061,17451990,16813568,17486088,77264143,77264152,16571292,17155507,16561252,77927007,78308055,41061067,78148514,93953687,76899756,76968080,78001707,78148532,19591610)" string(534) "select place_id from placex where place_id in (8326150,5990796115,5990796545,5990796544,3670718864,3670718589,40121621,88567293,89449003,88975223,89359856,88407220,18252874,88240453,88601958,6007392614,18825928,89505177,6007410734,6007410762,88241447,3670718872,59616725,4242317,11218392,11493810,61918120,11124290,61937070,17450953,18036658,18459061,17451990,16813568,17486088,77264143,77264152,16571292,17155507,16561252,77927007,78308055,41061067,78148514,93953687,76899756,76968080,78001707,78148532,19591610) and rank_search < 23" string(368) "select distinct l.place_id,ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), l.centroid) from place_classtype_place_county as l,placex as f where f.place_id in (4242317,3670718864,61937070,61918120,8326150) and ST_DWithin(l.centroid, f.centroid, 0.05) order by ST_Distance(ST_SetSRID(ST_Point(-84.476996666667,10.361465),4326), l.centroid) asc limit 2"
Place IDs: array(0) { }
string(2497) "select osm_type,osm_id,class,type,admin_level,rank_search,rank_address,min(place_id) as place_id,calculated_country_code as country_code,get_address_by_language(place_id, ARRAY['short_name:en-US','short_name:en','short_name:es','name:en-US','name:en','name:es','place_name:en-US','place_name:en','place_name:es','official_name:en-US','official_name:en','official_name:es','short_name','name','place_name','official_name','ref','type']) as langaddress,get_name_by_language(name, ARRAY['short_name:en-US','short_name:en','short_name:es','name:en-US','name:en','name:es','place_name:en-US','place_name:en','place_name:es','official_name:en-US','official_name:en','official_name:es','short_name','name','place_name','official_name','ref','type']) as placename,get_name_by_language(name, ARRAY['ref']) as ref,avg(ST_X(centroid)) as lon,avg(ST_Y(centroid)) as lat, coalesce(importance,0.75-(rank_search::float/40)) as importance, (select max(p.importance*(p.rank_address+2)) from place_addressline s, placex p where s.place_id = min(placex.place_id) and p.place_id = s.address_place_id and s.isaddress and p.importance is not null) as addressimportance, (extratags->'place') as extra_place from placex where place_id in (8326150,5990796115) and (placex.rank_address between 0 and 30 OR (extratags->'place') = 'city') and linked_place_id is null group by osm_type,osm_id,class,type,admin_level,rank_search,rank_address,calculated_country_code,importance,langaddress ,placename ,ref ,extratags->'place' union select 'T' as osm_type,place_id as osm_id,'place' as class,'house' as type,null as admin_level,30 as rank_search,30 as rank_address,min(place_id) as place_id,'us' as country_code,get_address_by_language(place_id, ARRAY['short_name:en-US','short_name:en','short_name:es','name:en-US','name:en','name:es','place_name:en-US','place_name:en','place_name:es','official_name:en-US','official_name:en','official_name:es','short_name','name','place_name','official_name','ref','type']) as langaddress,null as placename,null as ref,avg(ST_X(centroid)) as lon,avg(ST_Y(centroid)) as lat, -1.15 as importance, (select max(p.importance*(p.rank_address+2)) from place_addressline s, placex p where s.place_id = min(location_property_tiger.place_id) and p.place_id = s.address_place_id and s.isaddress and p.importance is not null) as addressimportance, null as extra_place from location_property_tiger where place_id in (8326150,5990796115) and 30 between 0 and 30 group by place_id order by importance desc"