pelias / schema

elasticsearch schema files and tooling
MIT License
40 stars 76 forks source link

add list_analyzers.js script #413

Closed missinglink closed 4 years ago

missinglink commented 4 years ago

cherry-picked from https://github.com/pelias/schema/pull/412, this PR introduces a new script which can be used to list which fields are present, along with the analyzers and normalizers associated with the field.

example usage:

node scripts/list_analyzers.js

----------------
 list analyzers
----------------

field                            type                             analyzer                  search_analyzer           normalizer
source                           keyword                          n/a                       n/a                       {none}
layer                            keyword                          n/a                       n/a                       {none}
name.*                           text                             peliasIndexOneEdgeGram    peliasIndexOneEdgeGram    n/a
phrase.*                         text                             peliasPhrase              peliasPhrase              n/a
address_parts.name               text                             keyword                   keyword                   n/a
address_parts.unit               text                             peliasUnit                peliasUnit                n/a
address_parts.number             text                             peliasHousenumber         peliasHousenumber         n/a
address_parts.street             text                             peliasStreet              peliasStreet              n/a
address_parts.cross_street       text                             peliasStreet              peliasStreet              n/a
address_parts.zip                text                             peliasZip                 peliasZip                 n/a
parent.continent                 text                             peliasAdmin               peliasAdmin               n/a
parent.continent_a               text                             peliasAdmin               peliasAdmin               n/a
parent.continent_id              keyword                          n/a                       n/a                       {none}
parent.ocean                     text                             peliasAdmin               peliasAdmin               n/a
parent.ocean_a                   text                             peliasAdmin               peliasAdmin               n/a
parent.ocean_id                  keyword                          n/a                       n/a                       {none}
parent.empire                    text                             peliasAdmin               peliasAdmin               n/a
parent.empire_a                  text                             peliasAdmin               peliasAdmin               n/a
parent.empire_id                 keyword                          n/a                       n/a                       {none}
parent.country                   text                             peliasAdmin               peliasAdmin               n/a
parent.country_a                 text                             peliasAdmin               peliasAdmin               n/a
parent.country_id                keyword                          n/a                       n/a                       {none}
parent.dependency                text                             peliasAdmin               peliasAdmin               n/a
parent.dependency_a              text                             peliasAdmin               peliasAdmin               n/a
parent.dependency_id             keyword                          n/a                       n/a                       {none}
parent.marinearea                text                             peliasAdmin               peliasAdmin               n/a
parent.marinearea_a              text                             peliasAdmin               peliasAdmin               n/a
parent.marinearea_id             keyword                          n/a                       n/a                       {none}
parent.macroregion               text                             peliasAdmin               peliasAdmin               n/a
parent.macroregion_a             text                             peliasAdmin               peliasAdmin               n/a
parent.macroregion_id            keyword                          n/a                       n/a                       {none}
parent.region                    text                             peliasAdmin               peliasAdmin               n/a
parent.region_a                  text                             peliasAdmin               peliasAdmin               n/a
parent.region_id                 keyword                          n/a                       n/a                       {none}
parent.macrocounty               text                             peliasAdmin               peliasAdmin               n/a
parent.macrocounty_a             text                             peliasAdmin               peliasAdmin               n/a
parent.macrocounty_id            keyword                          n/a                       n/a                       {none}
parent.county                    text                             peliasAdmin               peliasAdmin               n/a
parent.county_a                  text                             peliasAdmin               peliasAdmin               n/a
parent.county_id                 keyword                          n/a                       n/a                       {none}
parent.locality                  text                             peliasAdmin               peliasAdmin               n/a
parent.locality_a                text                             peliasAdmin               peliasAdmin               n/a
parent.locality_id               keyword                          n/a                       n/a                       {none}
parent.borough                   text                             peliasAdmin               peliasAdmin               n/a
parent.borough_a                 text                             peliasAdmin               peliasAdmin               n/a
parent.borough_id                keyword                          n/a                       n/a                       {none}
parent.localadmin                text                             peliasAdmin               peliasAdmin               n/a
parent.localadmin_a              text                             peliasAdmin               peliasAdmin               n/a
parent.localadmin_id             keyword                          n/a                       n/a                       {none}
parent.neighbourhood             text                             peliasAdmin               peliasAdmin               n/a
parent.neighbourhood_a           text                             peliasAdmin               peliasAdmin               n/a
parent.neighbourhood_id          keyword                          n/a                       n/a                       {none}
parent.postalcode                text                             peliasZip                 peliasZip                 n/a
parent.postalcode_a              text                             peliasZip                 peliasZip                 n/a
parent.postalcode_id             keyword                          n/a                       n/a                       {none}
center_point                     geo_point                        n/a                       n/a                       n/a
shape                            geo_shape                        n/a                       n/a                       n/a
bounding_box                     keyword                          n/a                       n/a                       {none}
source_id                        keyword                          n/a                       n/a                       {none}
category                         keyword                          n/a                       n/a                       {none}
population                       long                             n/a                       n/a                       n/a
popularity                       long                             n/a                       n/a                       n/a
addendum.*                       keyword                          n/a                       n/a                       {none}