openmaplt / vector-map

Vektorinis Lietuvos OpenStreetMap žemėlapis
https://openmap.lt/
MIT License
10 stars 4 forks source link

"name" normalization #345

Closed motiejus closed 4 years ago

motiejus commented 4 years ago

Prepares "name" field for autocomplete and lithuanian search with the following filters:

motiejus ~ $ curl -s http://localhost:8080/api/search?q=spunk | jq . | head -60
{
  "took": 6,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1291,
      "relation": "eq"
    },
    "max_score": 2.991993,
    "hits": [
      {
        "_index": "osm",
        "_type": "_doc",
        "_id": "t2265668604",
        "_score": 2.991993,
        "_source": {
          "city": "Vilnius",
          "street": "Užupio g.",
          "housenumber": "9",
          "name": "Špunka",
          "description": "Alaus ir giros krautuvė",
          "location": [
            54.6805328993302,
            25.2955115
          ]
        }
      },
      {
        "_index": "osm",
        "_type": "_doc",
        "_id": "t2811970425",
        "_score": 2.991993,
        "_source": {
          "city": "Vilnius",
          "street": "Savičiaus g.",
          "housenumber": "9",
          "name": "Špunka",
          "location": [
            54.6792189993299,
            25.2892532
          ]
        }
      },
      {
        "_index": "osm",
        "_type": "_doc",
        "_id": "t3118299290",
        "_score": 2.991993,
        "_source": {
          "city": "Vilnius",
          "street": "Kęstučio g.",
          "housenumber": "55",
          "name": "Špunka",
          "description": "Alaus ir giros krautuvė",