10000 For multiple postcodes, score should not depend of the postcode · Issue #811 · addok/addok · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
For multiple postcodes, score should not depend of the postcode #811
Open
@frodrigo

Description

@frodrigo

When a municipality is with multiple postcodes in the input data, the search should match any postcode in the same way and the score should be the same.

It looks like only one postcode is indexed can be found with a good match.

Here Bordeaux have multiple postcodes, the main is 33000, but there is at least also 3800 or 33200.

Search just "Bordeaux", score 0.96 for "33800 Bordeaux"

/search/?type=municipality&q=bordeaux&limit=1

      "properties": {
        "label": "Bordeaux",
        "score": 0.9607690909090908,
        "id": "33063",
        "type": "municipality",
        "name": "Bordeaux",
        "postcode": "33800",
        "citycode": "33063",
        "x": 416627.63,
        "y": 6423408.37,
        "population": 259809,
        "city": "Bordeaux",
        "context": "33, Gironde, Nouvelle-Aquitaine",
        "importance": 0.56846,
        "municipality": "Bordeaux"
      }

Search for "33800 Bordeaux", score 0.96 for "33800 Bordeaux"

/search/?type=municipality&q=33800 bordeaux&limit=1

      "properties": {
        "label": "Bordeaux",
        "score": 0.9607690909090908,
        "id": "33063",
        "type": "municipality",
        "name": "Bordeaux",
        "postcode": "33800",
        "citycode": "33063",
        "x": 416627.63,
        "y": 6423408.37,
        "population": 259809,
        "city": "Bordeaux",
        "context": "33, Gironde, Nouvelle-Aquitaine",
        "importance": 0.56846,
        "municipality": "Bordeaux"
      }

Search for "33000 Bordeaux", score 0.65 for "33800 Bordeaux"

/search/?type=municipality&q=33000 bordeaux&limit=1

      "properties": {
        "label": "Bordeaux",
        "score": 0.6516781818181816,
        "id": "33063",
        "type": "municipality",
        "name": "Bordeaux",
        "postcode": "33800",
        "citycode": "33063",
        "x": 416627.63,
        "y": 6423408.37,
        "population": 259809,
        "city": "Bordeaux",
        "context": "33, Gironde, Nouvelle-Aquitaine",
        "importance": 0.56846,
        "municipality": "Bordeaux"
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0