elastically
elastically copied to clipboard
Mapping file not found
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