string(262) "select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' tao yuan xian','tao yuan xian',' tao','tao',' yuan xian','yuan xian',' yuan','yuan',' xian','xian',' tao yuan','tao yuan',' taiwan','taiwan')" array(2) { [0]=> array(3) { ["string"]=> string(13) "tao yuan xian" ["words"]=> array(3) { [0]=> string(3) "tao" [1]=> string(4) "yuan" [2]=> string(4) "xian" } ["wordsets"]=> array(4) { [0]=> array(1) { [0]=> string(13) "tao yuan xian" } [1]=> array(2) { [0]=> string(3) "tao" [1]=> string(9) "yuan xian" } [2]=> array(3) { [0]=> string(3) "tao" [1]=> string(4) "yuan" [2]=> string(4) "xian" } [3]=> array(2) { [0]=> string(8) "tao yuan" [1]=> string(4) "xian" } } } [1]=> array(3) { ["string"]=> string(6) "taiwan" ["words"]=> array(1) { [0]=> string(6) "taiwan" } ["wordsets"]=> array(1) { [0]=> array(1) { [0]=> string(6) "taiwan" } } } } array(12) { ["taiwan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(6) "226984" ["word_token"]=> string(6) "taiwan" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(3) "220" } } [" taiwan"]=> array(2) { [0]=> array(8) { ["word_id"]=> string(8) "30690178" ["word_token"]=> string(7) " taiwan" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> string(2) "tw" ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } [1]=> array(8) { ["word_id"]=> string(7) "5518715" ["word_token"]=> string(7) " taiwan" ["word"]=> string(8) "Táiwān" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["tao"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(4) "5322" ["word_token"]=> string(3) "tao" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(4) "5406" } } [" tao"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(7) "2235830" ["word_token"]=> string(4) " tao" ["word"]=> string(6) "ТАО" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } [" tao yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(8) "13301577" ["word_token"]=> string(9) " tao yuan" ["word"]=> string(6) "桃源" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["tao yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(8) "13301578" ["word_token"]=> string(8) "tao yuan" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } [" tao yuan xian"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(8) "11886063" ["word_token"]=> string(14) " tao yuan xian" ["word"]=> string(9) "桃源县" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["tao yuan xian"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(8) "11886064" ["word_token"]=> string(13) "tao yuan xian" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["xian"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(4) "2863" ["word_token"]=> string(4) "xian" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(6) "403855" } } [" xian"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(7) "1320785" ["word_token"]=> string(5) " xian" ["word"]=> string(5) "XI'AN" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } ["yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(3) "282" ["word_token"]=> string(4) "yuan" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(6) "103376" } } [" yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(7) "6655390" ["word_token"]=> string(5) " yuan" ["word"]=> string(4) "YUAN" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } } tao yuan xian VALID: tao yuan xian tao VALID: tao yuan xian tao VALID: tao yuan VALID: yuan VALID: yuan xian VALID: xian tao yuan VALID: tao yuan xian VALID: xian VALID: xian taiwan VALID: taiwan VALID: taiwan VALID: taiwan VALID: taiwanarray(4) { [2]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [11886063]=> string(8) "11886063" } ["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"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } [1]=> array(16) { ["iSearchRank"]=> int(2) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [11886063]=> string(8) "11886063" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" } ["aFullNameAddress"]=> array(1) { [5518715]=> string(7) "5518715" } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } [3]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(3) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [11886064]=> string(8) "11886064" } ["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"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } [1]=> array(16) { ["iSearchRank"]=> int(3) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [11886064]=> string(8) "11886064" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" } ["aFullNameAddress"]=> array(1) { [5518715]=> string(7) "5518715" } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } [5]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(5) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [13301578]=> string(8) "13301578" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(1) { [1320785]=> string(7) "1320785" } ["aNameNonSearch"]=> array(1) { [2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } [1]=> array(16) { ["iSearchRank"]=> int(5) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [13301578]=> string(8) "13301578" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" } ["aFullNameAddress"]=> array(2) { [1320785]=> string(7) "1320785" [5518715]=> string(7) "5518715" } ["aNameNonSearch"]=> array(1) { [2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } [7]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(7) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [5322]=> string(4) "5322" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=> array(2) { [6655390]=> string(7) "6655390" [1320785]=> string(7) "1320785" } ["aNameNonSearch"]=> array(2) { [282]=> string(3) "282" [2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } [1]=> array(16) { ["iSearchRank"]=> int(7) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [5322]=> string(4) "5322" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" } ["aFullNameAddress"]=> array(3) { [6655390]=> string(7) "6655390" [1320785]=> string(7) "1320785" [5518715]=> string(7) "5518715" } ["aNameNonSearch"]=> array(2) { [282]=> string(3) "282" [2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } } } rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 2 # tao yuan xian(11886063)# tw 2 # tao yuan xian(11886063)# #taiwan(226984)# 3 #tao yuan xian(11886064)# tw 3 #tao yuan xian(11886064)# #taiwan(226984)# 5 #tao yuan(13301578)# #xian(2863)# tw 5 #tao yuan(13301578)# #xian(2863)# #taiwan(226984)# 7 #tao(5322)# #yuan(282)#, #xian(2863)# tw 7 #tao(5322)# #yuan(282)#, #xian(2863)# #taiwan(226984)# Search Loop, group 1, loop 1 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 2 # tao yuan xian(11886063)# tw string(241) "select place_id, 0::int as exactmatch from search_name where name_vector @> ARRAY[11886063] and country_code = 'tw' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 20" Place IDs: array(2) { [0]=> string(9) "135408541" [1]=> string(6) "276909" } Search Loop, group 1, loop 2 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 2 # tao yuan xian(11886063)# #taiwan(226984)# string(367) "select place_id, (select count(*) from (select unnest(ARRAY[5518715]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[11886063] and nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(1) { [0]=> string(6) "276909" } string(258) "select place_id from placex where place_id in (135408541,276909) and (placex.rank_address between 14 and 24 OR (extratags->'place') = 'city') UNION select place_id from location_property_tiger where place_id in (135408541,276909) and (30 between 14 and 24 )" Search Loop, group 2, loop 3 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 3 #tao yuan xian(11886064)# tw string(241) "select place_id, 0::int as exactmatch from search_name where name_vector @> ARRAY[11886064] and country_code = 'tw' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC limit 20" Place IDs: array(2) { [0]=> string(9) "135408541" [1]=> string(6) "276909" } Search Loop, group 2, loop 4 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 3 #tao yuan xian(11886064)# #taiwan(226984)# string(367) "select place_id, (select count(*) from (select unnest(ARRAY[5518715]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[11886064] and nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(1) { [0]=> string(6) "276909" } string(258) "select place_id from placex where place_id in (135408541,276909) and (placex.rank_address between 14 and 24 OR (extratags->'place') = 'city') UNION select place_id from location_property_tiger where place_id in (135408541,276909) and (30 between 14 and 24 )" Search Loop, group 3, loop 5 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 5 #tao yuan(13301578)# #xian(2863)# tw string(412) "select place_id, (select count(*) from (select unnest(ARRAY[1320785]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[13301578] and array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[2863] and country_code = 'tw' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(0) { } Search Loop, group 3, loop 6 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 5 #tao yuan(13301578)# #xian(2863)# #taiwan(226984)# string(436) "select place_id, (select count(*) from (select unnest(ARRAY[1320785,5518715]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[13301578] and array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[2863] and nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(0) { } Search Loop, group 4, loop 7 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 7 #tao(5322)# #yuan(282)#, #xian(2863)# tw string(420) "select place_id, (select count(*) from (select unnest(ARRAY[6655390,1320785]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[5322] and array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[282,2863] and country_code = 'tw' order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(0) { } Search Loop, group 4, loop 8 rank Name Tokens Name Not Address Tokens Address Not country operator class type house# Lat Lon Radius 7 #tao(5322)# #yuan(282)#, #xian(2863)# #taiwan(226984)# string(444) "select place_id, (select count(*) from (select unnest(ARRAY[6655390,1320785,5518715]) INTERSECT select unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector @> ARRAY[5322] and array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[282,2863] and nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit 20" Place IDs: array(0) { }