src/module-elasticsuite-core/etc/elasticsuite_indices.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Smile_ElasticsuiteCore indices configuration validation.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
* versions in the future.
*
* @category Smile
* @package Smile\ElasticsuiteCore
* @author Aurelien FOUCRET <aurelien.foucret@smile.fr>
* @author Romain RUAUD <romain.ruaud@smile.fr>
* @copyright 2020 Smile
* @license Open Software License ("OSL") v. 3.0
*/
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="indices">
<xs:complexType>
<xs:sequence>
<xs:element name="index" type="indexDefinition" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="indexDefinition">
<xs:sequence>
<xs:element name="type" maxOccurs="unbounded" minOccurs="0" type="typeDefinition"/>
</xs:sequence>
<xs:attribute type="xs:string" name="identifier" use="optional"/>
<xs:attribute type="xs:string" name="defaultSearchType" use="optional"/>
</xs:complexType>
<xs:complexType name="typeDefinition">
<xs:all>
<xs:element name="mapping" type="mappingDefinition"/>
</xs:all>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="idFieldName" use="required"/>
</xs:complexType>
<xs:complexType name="mappingDefinition">
<xs:annotation>
<xs:documentation>
Mapping declaration root node
</xs:documentation>
</xs:annotation>
<xs:choice maxOccurs="unbounded" minOccurs="1">
<xs:element name="field" type="fieldDefinition"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="fieldDefinition">
<xs:annotation>
<xs:documentation>Mapping field declaration root node</xs:documentation>
</xs:annotation>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:any processContents="lax" />
</xs:choice>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="type" use="required"/>
<xs:attribute type="xs:string" name="nestedPath" use="optional"/>
</xs:complexType>
</xs:schema>