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

Mapping file not found #191

Open
EOL-Fred opened this issue Sep 4, 2024 · 0 comments
Open

Mapping file not found #191

EOL-Fred opened this issue Sep 4, 2024 · 0 comments

Comments

@EOL-Fred
Copy link

EOL-Fred commented Sep 4, 2024

Hi,

First, here is my configuration :
Elastically 1.9.2 (tried with 1.9.0 and 1.9.1)
Symfony 7.0.6 with PHP 8.2.21

I have a similar situation to Issue #187, when I try to create the index land-registry I have this error message :

In YamlProvider.php line 37:
Mapping file "/land-registry_mapping.yaml" not found. Please check your configuration.

This is the configuration files I use :

#config/packages/elastically.yaml
elastically:
    connections:
        default:
            client:
                host:                '%env(ELASTICSEARCH_HOST)%'
                # If you want to use the Symfony HttpClient (you MUST create this service)
                #transport:           'JoliCode\Elastically\Transport\HttpClientTransport'

            # Path to the mapping directory (in YAML)
            mapping_directory:       '%kernel.project_dir%/config/elasticsearch'

            # Size of the bulk sent to Elasticsearch (default to 100)
            bulk_size:               100

            # Mapping between an index name and a FQCN
            index_class_mapping:
                land-registry:     App\Model\Location\LandRegisty

            # Configuration for the serializer
            serializer:
                # Fill a static context
                context_mapping:
                    foo:                 bar

            # If you want to add a prefix for your index in elasticsearch (you can still call it by its base name everywhere!)
            # prefix: '%kernel.environment%'
#config/elasticsearch/land-registry_mapping.yaml
settings:
    number_of_replicas: 0
    number_of_shards: 1
    refresh_interval: 60s
mappings:
    dynamic: false
    properties:
        prefix:
            type: text
        section:
            type: text
        planNb:
            type: text
        sheet:
            type: text
        northBound:
            type: double
        southBound:
            type: double
        eastBound:
            type: double
        westBound:
            type: double
        type:
            type: keyword
        layer:
            type: keyword
        text:
            x:
                type: double
            y:
                type: double
            height:
                type: double
            text:
                type: text
            rotation:
                type: double
        polygon:
            type: geo_shape
        extended:
            IDU:
                type: text
            COAR:
                type: text
            INDP:
                type: text
            SUPF:
                type: text
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