Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For multiple postcodes, score should not depend of the postcode #811

Open
frodrigo opened this issue Dec 16, 2023 · 0 comments
Open

For multiple postcodes, score should not depend of the postcode #811

frodrigo opened this issue Dec 16, 2023 · 0 comments

Comments

@frodrigo
Copy link
Contributor

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"
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant