index.xml 6.3 KB
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IndexConfigs>
    <client name="yohoSearchElasticsearch">
        <factory>com.yoho.search.core.es.impl.YohoIndexClientFactoryImpl</factory>
        <properties>
            <property key="es.cluster.name" value="yohosearch_test"/>
            <property key="es.servers" value="192.168.102.209:9300 192.168.102.216:9300"/>
        </properties>

        <index>
            <name>brand</name>
            <properties>
                <property key="number_of_shards" value="1"/>
                <property key="number_of_replicas" value="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </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="1"/>
                <property key="refresh_interval" value="1s"/>
                <property key="translog.flush_threshold_ops" value="5000"/>
            </properties>
            <builderClass>com.yoho.search.comsumer.builder.impl.ProductPoolIndexBuilder</builderClass>
            <mappingFile>esmapping/productpool.json</mappingFile>
        </index>
        
    </client>
</IndexConfigs>