index.xml 8.69 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"/>
            <property key="es.servers" value="192.168.102.12:9300 192.168.102.13: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.consumer.index.fullbuild.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.consumer.index.fullbuild.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.consumer.index.fullbuild.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.consumer.index.fullbuild.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.consumer.index.fullbuild.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.consumer.index.fullbuild.ProductIndexIndexBuilder,com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder</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.consumer.index.fullbuild.SuggestIndexBuilder</builderClass>
            <mappingFile>esmapping/suggest.json</mappingFile>
        </index>

        <index>
            <name>conversion</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.consumer.index.fullbuild.SuggestConversionIndexBuilder,com.yoho.search.consumer.index.fullbuild.SuggestConversionCustomIndexBuilder</builderClass>
            <mappingFile>esmapping/conversion.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.consumer.index.fullbuild.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.consumer.index.fullbuild.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.consumer.index.fullbuild.StorageSkuIndexBuilder</builderClass>
            <mappingFile>esmapping/storagesku.json</mappingFile>
        </index>

        <index>
            <name>robotquestion</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.consumer.index.fullbuild.RobotQuestionIndexBuilder</builderClass>
            <mappingFile>esmapping/robotquestion.json</mappingFile>
        </index>
        <index>
            <name>productpriceplan</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.consumer.index.fullbuild.ProductPricePlanIndexBuilder</builderClass>
            <mappingFile>esmapping/productpriceplan.json</mappingFile>
        </index>

        <index>
            <name>helper</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.consumer.index.fullbuild.HelperIndexBuilder</builderClass>
            <mappingFile>esmapping/helper.json</mappingFile>
        </index>

        <index>
            <name>shops</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.consumer.index.fullbuild.ShopsIndexBuilder,com.yoho.search.consumer.index.fullbuild.TblShopsIndexBuilder</builderClass>
            <mappingFile>esmapping/shops.json</mappingFile>
        </index>
        
    </client>
</IndexConfigs>