Examples of createIndex()


Examples of com.tinkerpop.blueprints.impls.tg.TinkerGraph.createIndex()

    public void testAddUniqueVertex() {
        IndexableGraph graph = new TinkerGraph();
        Vertex marko = graph.addVertex(0);
        marko.setProperty("name", "marko");
        Index<Vertex> index = graph.createIndex("txIdx", Vertex.class);
        index.put("name", "marko", marko);
        Vertex vertex = IndexableGraphHelper.addUniqueVertex(graph, null, index, "name", "marko");
        assertEquals(vertex.getProperty("name"), "marko");
        assertEquals(vertex, graph.getVertex(0));
        assertEquals(count(graph.getVertices()), 1);
View Full Code Here

Examples of fr.eolya.utils.nosql.mongodb.MongoDBCollection.createIndex()

    return true;
  }
 
  public boolean updateSourceLog(ISource src, int retention) {
    MongoDBCollection coll = new MongoDBCollection(db,"sources_log");
    coll.createIndex("id_source", false);
    coll.createIndex("createtime", false);

    BasicDBObject doc = new BasicDBObject();
    doc.put("id_source", src.getId());
    doc.put("createtime", new Date().getTime());
View Full Code Here

Examples of it.eng.spagobi.commons.utilities.indexing.LuceneIndexer.createIndex()

        File idxFile = new File(location+name);
        if(!idxFile.exists()){
          logger.debug("Creating index");
          LuceneIndexer indexer = new LuceneIndexer();
          try {
          indexer.createIndex(idxFile);
        } catch (CorruptIndexException e) {
          logger.error("Index corrupted "+e.getMessage(), e);
        } catch (IOException e) {
          logger.error(e.getMessage(), e);
        }
View Full Code Here

Examples of net.sf.katta.tool.SampleIndexGenerator.createIndex()

  @Override
  protected void afterClusterStart() throws Exception {
    _indexWithOneShard = new File("build/testdir/oneShardedIndex");
    FileUtil.deleteFolder(_indexWithOneShard);
    SampleIndexGenerator sampleIndexGenerator = new SampleIndexGenerator();
    sampleIndexGenerator.createIndex(new String[] { "a", "b", "c" }, _indexWithOneShard.getAbsolutePath(), 2, 3);
  }

  @Test
  public void testEqualDistributionWhenMoreNodesThenShards() throws Exception {
    int replicationCount = 1;
View Full Code Here

Examples of net.sf.logsaw.index.IIndexService.createIndex()

  public void testCreateAndDelete() {
    try {
      IIndexService indexService = IndexPlugin.getDefault().getIndexService();
      loadLogFile("sample-1.log.xml");
      createLogResource("UTF-8", Locale.getDefault(), getTimeZone());
      indexService.createIndex(getLogResource());
      indexService.synchronize(getLogResource(), null);
      assertTrue(IndexPlugin.getDefault().getIndexFile(getLogResource()).exists());
      assertEquals(5, indexService.count(getLogResource()));
      indexService.deleteIndex(getLogResource());
      assertTrue(!IndexPlugin.getDefault().getIndexFile(getLogResource()).exists());
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient.createIndex()

                return connection;
            }

            @Override
            public MutationState execute() throws SQLException {
                return client.createIndex(create, splits);
            }

            @Override
            public ExplainPlan getExplainPlan() throws SQLException {
                return new ExplainPlan(Collections.singletonList("CREATE INDEX"));
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient.createIndex()

                return connection;
            }

            @Override
            public MutationState execute() throws SQLException {
                return client.createIndex(create, splits);
            }

            @Override
            public ExplainPlan getExplainPlan() throws SQLException {
                return new ExplainPlan(Collections.singletonList("CREATE INDEX"));
View Full Code Here

Examples of org.apache.uima.cas.admin.FSIndexRepositoryMgr.createIndex()

              comparator.addKey(feature, keys[j].getComparator());
            }
          }
        }

        irm.createIndex(comparator, aIndexes[i].getLabel(), kind);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.apache.uima.cas.admin.FSIndexRepositoryMgr.createIndex()

              comparator.addKey(feature, keys[j].getComparator());
            }
          }
        }

        irm.createIndex(comparator, aIndexes[i].getLabel(), kind);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.apache.uima.cas.admin.FSIndexRepositoryMgr.createIndex()

    comp.setType(annotation);
    comp.addKey(annotation.getFeatureByBaseName(CAS.FEATURE_BASE_NAME_BEGIN),
            FSIndexComparator.STANDARD_COMPARE);
    comp.addKey(annotation.getFeatureByBaseName(CAS.FEATURE_BASE_NAME_END),
            FSIndexComparator.REVERSE_STANDARD_COMPARE);
    irm.createIndex(comp, ANNOT_BAG_INDEX, FSIndex.BAG_INDEX);
    irm.createIndex(comp, ANNOT_SET_INDEX, FSIndex.SET_INDEX);

    // Commit the index repository.
    irm.commit();
    // assert(cas.getIndexRepositoryMgr().isCommitted());
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.