index.xml 7.43 KB
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IndexConfigs>
    <client name="yohoSearchElasticsearch">
        <factory>com.yoho.search.index.es.ESIndexClientFactory</factory>
        <properties>
            <property key="es.cluster.name" value="${search.es.cluster.name}"/>
            <property key="es.servers" value="${search.es.servers}"/>
        </properties>
        
        <index>
            <name>brand</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.BrandIndexBuilder</builderClass>
            <mappingFile>esmapping/brand.json</mappingFile>
        </index>
        
        <index>
            <name>size</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.SizeIndexBuilder</builderClass>
            <mappingFile>esmapping/size.json</mappingFile>
        </index>
        
        <index>
            <name>style</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.StyleIndexBuilder</builderClass>
            <mappingFile>esmapping/style.json</mappingFile>
        </index>
        
        <index>
            <name>productcolor</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.ProductColorIndexBuilder</builderClass>
            <mappingFile>esmapping/productcolor.json</mappingFile>
        </index>
        
        <index>
            <name>productsort</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.ProductSortIndexBuilder</builderClass>
            <mappingFile>esmapping/productsort.json</mappingFile>
        </index>
        
        <index>
            <name>productindex</name>
            <properties>
                <property key="number_of_shards" value="2"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.ProductIndexIndexBuilder</builderClass>
            <mappingFile>esmapping/productindex.json</mappingFile>
        </index>

        <index>
            <name>suggest</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.SuggestIndexBuilder</builderClass>
            <mappingFile>esmapping/suggest.json</mappingFile>
        </index>

        <index>
            <name>tblproduct</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.TblProductIndexBuilder</builderClass>
            <mappingFile>esmapping/tblproduct.json</mappingFile>
        </index>

        <index>
            <name>standard</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.StandardIndexBuilder</builderClass>
            <mappingFile>esmapping/standard.json</mappingFile>
        </index>
        
        <index>
            <name>storagesku</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.StorageSkuIndexBuilder</builderClass>
            <mappingFile>esmapping/storagesku.json</mappingFile>
        </index>

        <index>
            <name>productpool</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="${search.index.number_of_replicas}"/>
                <property key="refresh_interval" value="${search.index.refresh_interval}"/>
                <property key="translog.flush_threshold_ops" value="${search.index.translog.flush_threshold_ops}"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.ProductPoolIndexBuilder</builderClass>
            <mappingFile>esmapping/productpool.json</mappingFile>
        </index>
    </client>
</IndexConfigs>