Examples of createIndex()


Examples of bm.db.Table.createIndex()

                        case DROP               :
                            table.drop();
                            break;

                        case CREATE_INDEX       :
                            table.createIndex(
                                    Conversor.toString( args[0] ),
                                    Conversor.toInteger( args[1] ).intValue(),
                                    Conversor.mapToStringArray( args[2] ),
                                    Conversor.toInteger( args[3] ).byteValue(),
                                    Conversor.toBoolean( args[4] )
View Full Code Here

Examples of ch.akuhn.hapax.index.TermDocumentMatrix.createIndex()

        Out.puts(tdm.density());

        Out.puts(tdm.terms().sortedCounts());

        LatentSemanticIndex lsi = tdm.createIndex();

        Out.puts(first(10, lsi.rankDocumentsByTerm("bag")));
        Out.puts(first(10, lsi.rankTermsByTerm("bag")));
        Out.puts(first(10, lsi.rankDocumentsByTerm("codemap")));
        Out.puts(first(10, lsi.rankDocumentsByQuery("split string by lower- and upper-case")));
View Full Code Here

Examples of ch.akuhn.hapax.index.TermDocumentMatrix.createIndex()

        .addDocument("m4", "Graph minors: A survey")
        .makeTDM();
       
    System.out.println(tdm);
    
    LatentSemanticIndex lsi = tdm.createIndex(2);
   
    Ranking<String> ranking = lsi.rankDocumentsByQuery("human computer interaction");
   
    System.out.println(ranking.top(10));
   
View Full Code Here

Examples of com.alibaba.wasp.client.MasterAdminKeepAliveConnection.createIndex()

          CreateIndexPlan createIndexPlan = (CreateIndexPlan) executePlan;
          Index index = createIndexPlan.getIndex();
          MasterAdminProtos.CreateIndexRequest request = RequestConverter
              .buildCreateIndexRequest(index);
          return ResponseConverter
              .buildExecuteResponse(masterAdminKeepAliveConnection.createIndex(
                  null, request));
        } else if (executePlan instanceof DropIndexPlan) {
          DropIndexPlan dropIndexPlan = (DropIndexPlan) executePlan;
          MasterAdminProtos.DropIndexRequest request = RequestConverter.buildDropIndexRequest(
              dropIndexPlan.getTableName(), dropIndexPlan.getIndexName());
View Full Code Here

Examples of com.gemstone.gemfire.cache.query.QueryService.createIndex()

  QueryService mockQueryService() throws RegionNotFoundException, IndexInvalidException, IndexNameConflictException, IndexExistsException, UnsupportedOperationException {
    QueryService queryService = mock(QueryService.class);

    when(queryService.getIndexes()).thenReturn(new ArrayList<Index>());

    when(queryService.createIndex(anyString(), anyString(),anyString())).thenAnswer(new Answer<Index>() {
      @Override
      public Index answer(InvocationOnMock invocation) throws Throwable {
        String indexName = (String) invocation.getArguments()[0];
        String indexedExpression = (String) invocation.getArguments()[1];
        String fromClause = (String) invocation.getArguments()[2];
View Full Code Here

Examples of com.mongodb.DBCollection.createIndex()

        try {
            final DBCollection collection = mongoConnection.getDatabase().getCollection("graylog2_metrics");
            // don't hang on to the data for too long.
            final BasicDBObject indexField = new BasicDBObject("timestamp", 1);
            final BasicDBObject indexOptions = new BasicDBObject("expireAfterSeconds", 5 * 60);
            collection.createIndex(indexField, indexOptions);

            collection.insert(docs, WriteConcern.UNACKNOWLEDGED);
        } catch (Exception e) {
            LOG.warn("Unable to write graylog2 metrics to mongodb. Ignoring this error.", e);
        }
View Full Code Here

Examples of com.mongodb.DBCollection.createIndex()

        }

        // Collection has not been cached yet. Do it now.
        DBCollection coll = getDatabase().getCollection("message_counts");

        coll.createIndex(new BasicDBObject("timestamp", 1));

        this.messageCountsCollection = coll;
        return coll;
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.createIndex()

  @Test
  public void testDropIndex() throws Exception {
    final OIndexManager indexManager = database.getMetadata().getIndexManager();

    indexManager.createIndex("anotherproperty", OClass.INDEX_TYPE.UNIQUE.toString(), new OPropertyIndexDefinition(CLASS_NAME,
        "fOne", OType.INTEGER), new int[] { database.getClusterIdByName(CLASS_NAME) }, null, null);

    assertNotNull(indexManager.getIndex("anotherproperty"));
    assertNotNull(indexManager.getClassIndex(CLASS_NAME, "anotherproperty"));
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex()

  @Test
  public void testCreateSimpleKeyInvalidNameIndex() {
    final OIndexManagerProxy indexManager = database.getMetadata().getIndexManager();

    try {
      indexManager.createIndex("simple:key", OClass.INDEX_TYPE.UNIQUE.toString(), new OSimpleKeyIndexDefinition(OType.INTEGER),
          null, null, null);
      fail();
    } catch (Exception e) {
      if (e instanceof OResponseProcessingException)
        e = (Exception) e.getCause();
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createIndex()

      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.LONG);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);

      testClass.createIndex("idIndex", OClass.INDEX_TYPE.UNIQUE, "id");

      schema.save();
    }
  }
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.