Examples of createIndex()


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

        OProperty p = database.getMetadata().getSchema().getClass("Account").getProperty("id");
        if (p == null)
          p = database.getMetadata().getSchema().getClass("Account").createProperty("id", OType.INTEGER);

        if (!p.isIndexed())
          p.createIndex(INDEX_TYPE.NOTUNIQUE);
      }
    }

    public void cycle() {
      record.reset();
View Full Code Here

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

        if (fields.get("min") != null)
          prop.setMin(fields.get("min"));
        if (fields.get("max") != null)
          prop.setMax(fields.get("max"));
        if (fields.get("indexed") != null)
          prop.createIndex(fields.get("indexed").equals("Unique") ? OProperty.INDEX_TYPE.UNIQUE : OProperty.INDEX_TYPE.NOTUNIQUE);

        sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_TEXT_PLAIN,
            "Property " + fields.get("name") + " created successfully");

      } catch (Exception e) {
View Full Code Here

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

        if (fields.get("min") != null)
          prop.setMin(fields.get("min"));
        if (fields.get("max") != null)
          prop.setMax(fields.get("max"));
        if (fields.get("indexed") != null)
          prop.createIndex(fields.get("indexed").equals("Unique") ? OProperty.INDEX_TYPE.UNIQUE : OProperty.INDEX_TYPE.NOTUNIQUE);

        sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_TEXT_PLAIN,
            "Property " + fields.get("name") + " created successfully with id=" + prop.getId());

      } catch (Exception e) {
View Full Code Here

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

        if (fields.get("min") != null)
          prop.setMin(fields.get("min"));
        if (fields.get("max") != null)
          prop.setMax(fields.get("max"));
        if (fields.get("indexed") != null)
          prop.createIndex(fields.get("indexed").equals("Unique") ? OProperty.INDEX_TYPE.UNIQUE : OProperty.INDEX_TYPE.NOTUNIQUE);

        sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_TEXT_PLAIN,
            "Property " + fields.get("name") + " created successfully with id=" + prop.getId());

      } catch (Exception e) {
View Full Code Here

Examples of com.salesforce.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 com.splout.db.hadoop.TableBuilder.createIndex()

      }

      // partition the dataset by pagename - which should give a fair even distribution.
      tableBuilder.partitionBy("pagename");
      // create a compound index on pagename, date so that typical queries for the dataset will be fast
      tableBuilder.createIndex("pagename", "date");

      long nonExactPageSize = memoryForIndexing / 32000; // number of pages
      int pageSize = (int) Math.pow(2, (int) Math.round(Math.log(nonExactPageSize) / Math.log(2)));
      Log.info("Pagesize = " + pageSize + " as memory for indexing was [" + memoryForIndexing
          + "] and there are 32000 pages.");
View Full Code Here

Examples of com.tinkerpop.blueprints.IndexableGraph.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 com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.createIndex()

  @Override
  public <T extends Element> Index<T> createIndex(final String indexName, final Class<T> indexClass,
      final Parameter... indexParameters) {
    final OrientBaseGraph g = acquire();
    try {
      return g.createIndex(indexName, indexClass, indexParameters);
    } finally {
      g.shutdown();
    }
  }
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientEdgeType.createIndex()

    vertexType.createProperty("uuid", OType.STRING);
    vertexType.createIndex("TestVertexUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");

    final OrientEdgeType edgeType = graph.createEdgeType("TestEdge");
    edgeType.createProperty("uuid", OType.STRING);
    edgeType.createIndex("TestEdgeUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");
    graph.shutdown();
  }

  private void addEdgesConcurrently() throws Exception {
    ExecutorService executorService = Executors.newCachedThreadPool();
View Full Code Here

Examples of com.tinkerpop.blueprints.impls.orient.OrientVertexType.createIndex()

    graph.setAutoStartTx(false);
    graph.commit();

    final OrientVertexType vertexType = graph.createVertexType("TestVertex");
    vertexType.createProperty("uuid", OType.STRING);
    vertexType.createIndex("TestVertexUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");

    final OrientEdgeType edgeType = graph.createEdgeType("TestEdge");
    edgeType.createProperty("uuid", OType.STRING);
    edgeType.createIndex("TestEdgeUuidIndex", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "uuid");
    graph.shutdown();
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.