Gets the local secondary indexes for the given class.
@param indexNames The index names.
@return The map of index name to LocalSecondaryIndexes.
519824
public Collection<LocalSecondaryIndex> localSecondaryIndexes() {
        if (localSecondaryIndexes.isEmpty()) {
            return null;
        }
        final Collection<LocalSecondaryIndex> copies = new ArrayList<LocalSecondaryIndex>(localSecondaryIndexes.size());
        for (final String indexName : localSecondaryIndexes.keySet()) {
            copies.add(localSecondaryIndex(indexName));
        }
        return copies;
    }
592416
public static final Index indexAllClasses(final List<File> classFiles) {
        final Indexer indexer = new Indexer();
        indexAllClasses(indexer, classFiles);
        return indexer.complete();
    }
700730
public IndexModel index(String indexName) {
		checkReadOnly();
		IndexModel index = new IndexModel();
		index.setName(indexName);
		index.setTableModel(this);
		getIndexConsts().add(index);
		return index;
	}
1041281
public int reverseIndexes(int... indexes) {
        long[] idx = translateToPhysical(ArrayUtil.toLongArray(indexes));
        sort();

        // FIXME: int cast
        return indexesBinarySearch(0, (int) length(), ArrayUtil.toInts(idx));
    }
83940
public function getAllIndexNames()
    {
        $indexes = [];
        foreach ($this->getClassesAndAnnotations() as $configuration) {
            /** @var Indexable $configuration */
            $indexes[$configuration->indexName] = $configuration->indexName;
        }

        return array_keys($indexes);
    }
929190
function (query, indexName) {
        if (!query) return;
        var index = this._indexes[indexName || this.mainIndex];
        return index[query] || index[query[this.mainIndex]] || this._indexes.cid[query] || this._indexes.cid[query.cid];
    }
374741
public List<Index<SecondaryTable<T>>> getAllIndex()
   {
      List<Index<SecondaryTable<T>>> list = new ArrayList<Index<SecondaryTable<T>>>();
      List<Node> nodeList = childNode.get("index");
      for(Node node: nodeList)
      {
         Index<SecondaryTable<T>>  type = new IndexImpl<SecondaryTable<T>>(this, "index", childNode, node);
         list.add(type);
      }
      return list;
   }
507569
@Override
    public Map<String, FieldTypes> get(final Collection<String> fieldNames, Collection<String> indexNames) {
        // Shortcut - if we don't select any fields we don't have to do any database query
        if (fieldNames.isEmpty()) {
            return Collections.emptyMap();
        }

        // We have to transform the field type database entries to make them usable for the user.
        //
        // [
        //   {
        //     "index_name": "graylog_0",
        //     "fields": [
        //       {"field_name": "message", "physical_type": "text"},
        //       {"field_name": "source", "physical_type": "keyword"}
        //     ]
        //   },
        //   {
        //     "index_name": "graylog_1",
        //     "fields": [
        //       {"field_name": "message", "physical_type": "text"},
        //     ]
        //   }
        // ]
        //
        // gets transformed into
        //
        // {
        //   "message": {
        //     "field_name": "message",
        //     "types": [
        //       {
        //         "type": "string",
        //         "properties": ["full-text-search"],
        //         "index_names": ["graylog_0", "graylog_1"]
        //     ]
        //   },
        //   "source": {
        //     "field_name": "source",
        //     "types": [
        //       {
        //         "type": "string",
        //         "properties": ["enumerable"],
        //         "index_names": ["graylog_0"]
        //     ]
        //   }
        // }

        // field-name -> {physical-type -> [index-name, ...]}
        final Map<String, SetMultimap<String, String>> fields = new HashMap<>();

        // Convert the data from the database to be indexed by field name and physical type
        getTypesStream(fieldNames, indexNames).forEach(types -> {
            final String indexName = types.indexName();

            types.fields().forEach(fieldType -> {
                final String fieldName = fieldType.fieldName();
                final String physicalType = fieldType.physicalType();

                if (fieldNames.contains(fieldName)) {
                    if (indexNames.isEmpty() || indexNames.contains(indexName)) {
                        if (!fields.containsKey(fieldName)) {
                            fields.put(fieldName, HashMultimap.create());
                        }
                        fields.get(fieldName).put(physicalType, indexName);
                    }
                }
            });
        });

        final ImmutableMap.Builder<String, FieldTypes> result = ImmutableMap.builder();

        for (Map.Entry<String, SetMultimap<String, String>> fieldNameEntry : fields.entrySet()) {
            final String fieldName = fieldNameEntry.getKey();
            final Map<String, Collection<String>> physicalTypes = fieldNameEntry.getValue().asMap();

            // Use the field type mapper to do the conversion between the Elasticsearch type and our logical type
            final Set<FieldTypes.Type> types = physicalTypes.entrySet().stream()
                    .map(entry -> {
                        final String physicalType = entry.getKey();
                        final Set<String> indices = ImmutableSet.copyOf(entry.getValue());

                        return typeMapper.mapType(physicalType).map(t -> t.withIndexNames(indices));
                    })
                    .filter(Optional::isPresent)
                    .map(Optional::get)
                    .collect(Collectors.toSet());

            result.put(fieldName, FieldTypes.create(fieldName, types));
        }

        return result.build();
    }
555378
private int findIndexForName(String[] fieldNames, String searchName)
    {
        for(int i = 0; i < fieldNames.length; i++)
        {
            if(searchName.equals(fieldNames[i]))
            {
                return i;
            }
        }
        throw new PersistenceBrokerException("Can't find field name '" + searchName +
                "' in given array of field names");
    }
255744
@Override
    public INDArray get(INDArrayIndex... indexes) {

        sort();

        if (indexes.length == 1 && indexes[0] instanceof NDArrayIndexAll || (indexes.length == 2 && (isRowVector()
                        && indexes[0] instanceof PointIndex && indexes[0].offset() == 0
                        && indexes[1] instanceof NDArrayIndexAll
                        || isColumnVector() && indexes[1] instanceof PointIndex && indexes[0].offset() == 0
                                        && indexes[0] instanceof NDArrayIndexAll)))
            return this;

        throw new UnsupportedOperationException("Not implemented");
    }
149818
private static synchronized Set<OIndexFactory> getFactories() {
		if (FACTORIES == null) {

			final Iterator<OIndexFactory> ite = lookupProviderWithOrientClassLoader(OIndexFactory.class,orientClassLoader);

			final Set<OIndexFactory> factories = new HashSet<OIndexFactory>();
			while (ite.hasNext()) {
				factories.add(ite.next());
			}
			FACTORIES = Collections.unmodifiableSet(factories);
		}
		return FACTORIES;
	}
380164
public function getIndex($indexName)
    {
        if (isset($this->globalIndexConsumed[$indexName])) {
            return $this->globalIndexConsumed[$indexName];
        }

        if (isset($this->localIndexConsumed[$indexName])) {
            return $this->localIndexConsumed[$indexName];
        }

        //TODO: exception
        //or return null?
        throw new \Exception;
    }
254887
protected final void indexSubclasses(Class<?>... classes) {
		for (Class<?> klass : classes) {
			indexedSuperclasses.add(klass.getCanonicalName());
		}
		annotationDriven = false;
	}
938151
@Nullable
    @ThriftField(value = 4, requiredness = OPTIONAL)
    public List<Set<String>> getIndexableKeys()
    {
        return indexableKeys;
    }
918409
public void setIndexNames(java.util.Collection<String> indexNames) {
        if (indexNames == null) {
            this.indexNames = null;
            return;
        }

        this.indexNames = new java.util.ArrayList<String>(indexNames);
    }
389998
public List<String> getIndexNames() {

        List<String> indexNames = new ArrayList<String>();
        for (int i = 0, n = m_indexes.size(); i < n; i++) {
            indexNames.add((m_indexes.get(i)).getName());
        }

        return indexNames;
    }
207089
public IndexDef getIndex(String name)
    {
        String   realName = (name == null ? "" : name);
        IndexDef def      = null;

        for (Iterator it = getIndices(); it.hasNext();)
        {
            def = (IndexDef)it.next();
            if (def.getName().equals(realName))
            {
                return def;
            }
        }
        return null;
    }