Examples of IndexService


Examples of org.elasticsearch.index.service.IndexService

        request.index(clusterState.metaData().concreteIndex(request.index()));
        return clusterState.routingTable().index(request.index()).randomAllActiveShardsIt();
    }

    @Override protected AnalyzeResponse shardOperation(AnalyzeRequest request, int shardId) throws ElasticSearchException {
        IndexService indexService = indicesService.indexServiceSafe(request.index());
        Analyzer analyzer = null;
        String field = null;
        if (request.field() != null) {
            FieldMapper fieldMapper = indexService.mapperService().smartNameFieldMapper(request.field());
            if (fieldMapper != null) {
                analyzer = fieldMapper.indexAnalyzer();
                field = fieldMapper.names().indexName();
            }
        }
        if (field == null) {
            field = "_all";
        }
        if (analyzer == null && request.analyzer() != null) {
            analyzer = indexService.analysisService().analyzer(request.analyzer());
        } else if (analyzer == null) {
            analyzer = indexService.analysisService().defaultIndexAnalyzer();
        }
        if (analyzer == null) {
            throw new ElasticSearchIllegalArgumentException("failed to find analyzer");
        }
View Full Code Here

Examples of org.neo4j.index.IndexService

     * A simple test to exercise the meta-model api.
     */
    @Test
    public void shouldCreateMetaModel()
    {
        IndexService index = new LuceneIndexService( neo4j );
        MetaModel meta = new MetaModelImpl( neo4j, index );
        Transaction tx = neo4j.beginTx();
        try
        {
            MetaModelNamespace namespace = meta.getGlobalNamespace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.