Examples of Index


Examples of com.google.appengine.api.search.Index

            .addField(Field.newBuilder()
                .setName("published")
                .setDate(model.getPublished())
        ).build();

        Index index = getDocumentIndex(userModel);

        index.put(document);
    }
View Full Code Here

Examples of com.google.nigori.common.Index

      if (args.length != 7) {
        System.err.println("*** Error: exactly seven elements needed for a put action");
        usage();
        return;
      }
      RevValue success = nigori.put(new Index(args[5]), MessageLibrary.toBytes(args[6]));
      System.out.println("Success: " + success);
    } else if (action.equals("get")) {
      if (args.length != 6) {
        System.err.println("*** Error: exactly six elements needed for a get action");
        usage();
        return;
      }
      try {
        Collection<RevValue> data = nigori.get(new Index(args[5]));
        if (data != null) {
          for (RevValue datum : data) {
            System.out.println(datum.getRevision() + " : " + new String(datum.getValue()));
          }
        } else {
          System.out.println("No values for index.");
        }
      } catch (IOException ioe) {
        System.out.println(ioe.getMessage());
      }
    } else if (action.equals("delete")) {
      if (args.length != 6) {
        System.err.println("*** Error: exactly six elements needed for a delete action");
        usage();
        return;
      }
      boolean success = nigori.removeIndex(new Index(args[5]), Revision.EMPTY);
      System.out.println("Success: " + success);
    } else {
      System.err.println("*** Error: Unknown action " + action);
      usage();
    }
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.Index

        (!indexOnlyQuery.hasKeyProperty() ||
            indexProperties.get(0).getDirectionEnum() == Property.Direction.ASCENDING)) {
      return null;
    }

    Index index = new Index();
    index.setEntityType(query.getKind());
    index.setAncestor(isAncestor);
    index.mutablePropertys().addAll(indexProperties);
    return index;
  }
View Full Code Here

Examples of com.googlecode.objectify.annotation.Index

    }

    IfConditionGenerator ifGenerator = new IfConditionGenerator(fact);

    // Check @Index and @Unindex conditions
    Index indexedAnn = field.getAnnotation(Index.class);
    Unindex unindexedAnn = field.getAnnotation(Unindex.class);

    if (indexedAnn != null && unindexedAnn != null)
      throw new IllegalStateException("Cannot have @Indexed and @Unindexed on the same field: " + field);
   
    if (indexedAnn != null)
      this.indexConditions = ifGenerator.generateIfConditions(indexedAnn.value(), field);
   
    if (unindexedAnn != null)
      this.unindexConditions = ifGenerator.generateIfConditions(unindexedAnn.value(), field);
   
    // Now watch out for @IgnoreSave conditions
View Full Code Here

Examples of com.hazelcast.query.impl.Index

        MapContainer mapContainer = mapService.getMapContainer(name);
        RecordStore rs = mapService.getPartitionContainer(getPartitionId()).getRecordStore(name);
        Map<Data, Record> records = rs.getReadonlyRecordMap();
        IndexService indexService = mapContainer.getIndexService();
        SerializationService ss = getNodeEngine().getSerializationService();
        Index index = indexService.addOrGetIndex(attributeName, ordered);
        for (Record record : records.values()) {
            Data key = record.getKey();
            Object value = record.getValue();
            index.saveEntryIndex(new QueryEntry(ss, key, key, value));
        }
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.index.Index

//                                            int readCacheSize,int writeCacheSize)
   
    public static void dumpNodeIndex(String dir)
    {
        Location location = new Location(dir) ;
        Index nodeToId = SetupTDB.makeIndex(location,  Names.indexNode2Id, SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId, -1 ,-1) ;
        Iterator<Record> iter = nodeToId.iterator() ;
        while(iter.hasNext())
        {
            System.out.println(iter.next()) ;
        }
    }
View Full Code Here

Examples of com.impetus.kundera.annotations.Index

    {
        if (clazz != null)
        {
            metadata.setIndexName(clazz.getSimpleName());
        }
        Index idx = clazz.getAnnotation(Index.class);

        IndexCollection indexes = clazz.getAnnotation(IndexCollection.class);

        EntityType entityType = (EntityType) kunderaMetadata.getApplicationMetadata()
                .getMetaModelBuilder(metadata.getPersistenceUnit()).getManagedTypes().get(clazz);

        List<String> columnsNameToBeIndexed = new ArrayList<String>();

        Map<String, com.impetus.kundera.index.Index> indexedColumnsMap = new HashMap<String, com.impetus.kundera.index.Index>();

        if (null != indexes)
        {
            if (indexes.columns() != null && indexes.columns().length != 0)
            {
                metadata.setIndexable(true);
                for (com.impetus.kundera.index.Index indexedColumn : indexes.columns())
                {
                    if (indexedColumn.type().equals("composite"))
                    {
                        // means comma seperated list of columns
                        metadata.addIndexProperty(
                                prepareCompositeIndexName(indexedColumn.name(), entityType, metadata),
                                populatePropertyIndex(indexedColumn.indexName(), indexedColumn.type(), null, null, null));

                    }
                    else
                    {
                        indexedColumnsMap.put(indexedColumn.name(), indexedColumn);
                    }
                }
            }
        }
        else if (null != idx)
        {
            boolean isIndexable = idx.index();

            if (isIndexable)
            {
                metadata.setIndexable(isIndexable);

                String indexName = idx.name();
                if (indexName != null && !indexName.isEmpty())
                {
                    metadata.setIndexName(indexName);
                }

                if (idx.columns() != null && idx.columns().length != 0)
                {
                    for (String indexedColumn : idx.columns())
                    {
                        columnsNameToBeIndexed.add(indexedColumn);
                    }
                }
            }
View Full Code Here

Examples of com.mozilla.grouperfish.services.api.Index

        this.indexes = index;
    }

    @Override
    public Task handle(final Task task) throws Fail {
        Index index = indexes.index(task.namespace().bucket(Type.DOCUMENT));
        Assert.nonNull(task);
        try {
            final TsvJsonWriter tsvWriter = new TsvJsonWriter(writer(fs, task, inputFilename(task)));
            for (final Document doc : index.find(task.query())) tsvWriter.write(doc);
            tsvWriter.close();

            final Writer parametersWriter = writer(fs, task, parametersFilename(task));
            parametersWriter.write(task.transform().parametersJson());
            parametersWriter.close();
View Full Code Here

Examples of com.mysql.clusterj.core.store.Index

        this.partitionKeyFieldHandlers = new DomainFieldHandlerImpl[numberOfPartitionKeyColumns];

        // Process indexes for the table. There might not be a field associated with the index.
        // The first entry in indexHandlerImpls is for the mandatory hash primary key,
        // which is not really an index but is treated as an index by query.
        Index primaryIndex = dictionary.getIndex("PRIMARY$KEY", tableName, "PRIMARY");
        IndexHandlerImpl primaryIndexHandler =
            new IndexHandlerImpl(this, dictionary, primaryIndex, primaryKeyColumnNames);
        indexHandlerImpls.add(primaryIndexHandler);

        String[] indexNames = table.getIndexNames();
        for (String indexName: indexNames) {
            // the index alias is the name as known by the user (without the $unique suffix)
            String indexAlias = removeUniqueSuffix(indexName);
            Index index = dictionary.getIndex(indexName, tableName, indexAlias);
            String[] columnNames = index.getColumnNames();
            IndexHandlerImpl imd = new IndexHandlerImpl(this, dictionary, index, columnNames);
            indexHandlerImpls.add(imd);
        }

        if (dynamic) {
View Full Code Here

Examples of com.netflix.exhibitor.core.entities.Index

                            catch ( Exception e )
                            {
                                context.getExhibitor().getLog().add(ActivityLog.Type.ERROR, "Loading index metadata: " + f, e);
                                metaData = new IndexMetaData(new Date(), new Date(), 0);
                            }
                            return new Index
                            (
                                f.getName(),
                                format.format(metaData.getFrom()),
                                format.format(metaData.getTo()),
                                metaData.getEntryCount()
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.