Examples of index()


Examples of org.elasticsearch.index.gateway.SnapshotStatus.index()

                    default:
                        stage = GatewaySnapshotStatus.Stage.NONE;
                        break;
                }
                shardStatus.gatewaySnapshotStatus = new GatewaySnapshotStatus(stage, snapshotStatus.startTime(), snapshotStatus.time(),
                        snapshotStatus.index().totalSize(), snapshotStatus.translog().expectedNumberOfOperations());
            }
        }

        return shardStatus;
    }
View Full Code Here

Examples of org.elasticsearch.index.get.GetResult.index()

        if (viewContext == null) {
            throw new ElasticSearchViewNotFoundException("No view [" + request.format() + "] found for document type [" + request.type() + "]");
        }

        // Set some org.elasticsearch.test.integration.views.mappings.data required for view rendering
        viewContext.index(getResult.index())
                .type(getResult.type())
                .id(getResult.id())
                .version(getResult.version())
                .source(getResult.sourceAsMap());
View Full Code Here

Examples of org.elasticsearch.index.service.IndexService.index()

        indexInjector.getInstance(MapperService.class).close();
        indexInjector.getInstance(IndexQueryParserService.class).close();

        Injectors.close(injector);

        indicesLifecycle.afterIndexClosed(indexService.index(), delete);

        if (delete) {
            FileSystemUtils.deleteRecursively(nodeEnv.indexLocation(new Index(index)));
        }
    }
View Full Code Here

Examples of org.elasticsearch.index.shard.ShardId.index()

        String type = args.length > 0 ? args[0] : "ram";
        Store store;
        if (type.equalsIgnoreCase("ram")) {
            store = new RamStore(shardId, settings, null);
        } else if (type.equalsIgnoreCase("simple-fs")) {
            store = new SimpleFsStore(shardId, settings, new SimpleFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("mmap-fs")) {
            store = new NioFsStore(shardId, settings, new NioFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("nio-fs")) {
            store = new MmapFsStore(shardId, settings, new MmapFsIndexStore(shardId.index(), settings, null, nodeEnvironment), byteBufferCache);
        } else if (type.equalsIgnoreCase("memory")) {
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.index()

                            .routing(indexRequest.routing()).parent(indexRequest.parent());
                    long version;
                    Engine.IndexingOperation op;
                    if (indexRequest.opType() == IndexRequest.OpType.INDEX) {
                        Engine.Index index = indexShard.prepareIndex(sourceToParse).version(indexRequest.version()).versionType(indexRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
                        indexShard.index(index);
                        version = index.version();
                        op = index;
                    } else {
                        Engine.Create create = indexShard.prepareCreate(sourceToParse).version(indexRequest.version()).versionType(indexRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
                        indexShard.create(create);
View Full Code Here

Examples of org.elasticsearch.view.ViewContext.index()

        if (viewContext == null) {
            throw new ElasticSearchViewNotFoundException("No view [" + request.format() + "] found for document type [" + request.type() + "]");
        }

        // Set some org.elasticsearch.test.integration.views.mappings.data required for view rendering
        viewContext.index(getResult.index())
                .type(getResult.type())
                .id(getResult.id())
                .version(getResult.version())
                .source(getResult.sourceAsMap());
View Full Code Here

Examples of org.grouplens.lenskit.transform.quantize.Quantizer.index()

        // TODO Re-use accumulators
        MutualInformationAccumulator accum = new MutualInformationAccumulator(q.getCount());

        for (Pair<VectorEntry,VectorEntry> e: Vectors.fastIntersect(ratings, predictions)) {
            accum.count(q.index(e.getLeft().getValue()),
                        q.index(e.getRight().getValue()));
        }

        if (accum.getCount() > 0) {
            double ratingEntropy = accum.getV1Entropy();
View Full Code Here

Examples of org.grouplens.lenskit.transform.quantize.ValueArrayQuantizer.index()

    @Test
    public void testFindSingle() {
        Quantizer q = new ValueArrayQuantizer(new double[]{5.0});
        assertThat(q.getCount(), equalTo(1));
        assertThat(q.getIndexValue(0), equalTo(5.0));
        assertThat(q.index(2.5), equalTo(0));
        assertThat(q.index(5.0), equalTo(0));
    }

    @Test
    public void testSomeElements() {
View Full Code Here

Examples of org.hibernate.search.FullTextSession.index()

                int i = 0;
                while (true) {
                    i++;
                    Object o = cursor.get(0);
                    log.debug("indexing instance " + i + ": " + o);
                    ftSession.index(o);
                    if (i % batchSize == 0) {
                        log.debug("ending batch, beginning new batch");
                        ftSession.clear(); // Clear persistence context for each batch
                    }
                    progress.setPercentComplete( new Double(100d/count*i).intValue() );
View Full Code Here

Examples of org.hibernate.search.annotations.Indexed.index()

    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( pc.getMappedClass() );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
        else {
          rootIndex = currentClazz;
        }
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.