Read index settings
@param root dir within the classpath
@param index index name
@return Update Settings
160790
public static String readUpdateSettings(String root, String index) {
		return readSettings(root, index, Defaults.UpdateIndexSettingsFileName);
	}
1082623
public Object opt(int index) {
    return (index < 0 || index >= length()) ? null : this.myArrayList.get(index);
  }
17561
public Object opt(int index) {
		return (index < 0 || index >= this.length()) ? null : this.list
				.get(index);
	}
1349229
def set_index(self, index):
        
        self.setCurrentIndex(index)
        self.new_root.emit(index)
        self.scrollTo(index)
882001
public static <T> PositionFactory<Object, T> atArrayIndex(final int index) {
        return new PositionFactory<Object, T>(index) {

            @Override
            public <P> RelativePosition.ReadWrite<P, T> of(Position.Readable<P> parentPosition) {
                final Type parentType = parentPosition.getType();
                Validate.isTrue(TypeUtils.isArrayType(parentType), "%s is not an array type", parentType);
                return super.of(parentPosition);
            }

            @Override
            public String toString() {
                return String.format("Array Element [%s]", index);
            }

            @Override
            protected <P> Type evaluateElementType(Position<P> parentPosition) {
                return TypeUtils.getArrayComponentType(parentPosition.getType());
            }
        };
    }
395072
final protected function setIndex($index)
    {
        $this->model->leafIndex = $index;
        $this->model->updatePath();
        // Signal to all or any sub leaves that need to recompute their own path now.
        $this->leafPathChanged();
    }
530313
public boolean isExistingIndex(String index) throws IOException {
        logger.debug("is existing index [{}]", index);
        try {
            Response restResponse = lowLevelClient.performRequest("GET", "/" + index);
            logger.trace("get index metadata response: {}", asMap(restResponse));
            return true;
        } catch (ResponseException e) {
            if (e.getResponse().getStatusLine().getStatusCode() == 404) {
                logger.debug("index [{}] does not exist", index);
                return false;
            }
            throw e;
        }
    }
1191521
private void addIndex(final String index) throws IOException {

        logger.info("Adding index '{}'...", index);

        String resourcePath = "/" + index;

        if (doesResourceNotExist(resourcePath)) {

            try {
                elasticSearchAdminClient.performRequest(HttpMethod.PUT, resourcePath);

                logger.info("Added '{}' index", index);
            } catch (ResponseException e) {

                boolean errorCreatingIndex = true;

                Response errorResponse = e.getResponse();
                if (errorResponse.getStatusLine().getStatusCode() == HttpStatus.SC_BAD_REQUEST) {
                    JsonNode root = objectMapper.readTree(EntityUtils.toString(errorResponse.getEntity()));
                    String errorCode = root.get("error").get("type").asText();
                    if ("index_already_exists_exception".equals(errorCode)) {
                        errorCreatingIndex = false;
                    }
                }

                if (errorCreatingIndex) {
                    throw e;
                }
            }
        } else {
            logger.info("Index '{}' already exists", index);
        }
    }
6818
public boolean readHistoryEnabledForField(String index, String field) {
        
        if(!this.enabled) {
            return false;
        }
        
        if(searchguardIndex.equals(index)) {
            return logInternalConfig;
        }
        
        try {
            final Set<String> fields = cache.get(index);
            if(fields.isEmpty()) {
                return false;
            }

            return WildcardMatcher.matchAny(fields, field);
        } catch (ExecutionException e) {
            log.error(e);
            return true;
        }
    }
1298829
public String convertIndexToString(int index)
    {
        String tempString = null;
        if (index == 0)
            tempString = NO;
        else if (index == 1)
            tempString = YES;
        return tempString;
    }
180590
private IndexReader getIndexReader()
    {
        // removed flushInternal() call while reading
        if (reader == null)
        {
            try
            {
                if (!isInitialized)
                {
                    Directory sourceDir = FSDirectory.open(getIndexDirectory().toPath());
                    copy(sourceDir, index);
                    isInitialized = true;
                }
                reader = DirectoryReader.open(index);
            }
            catch (IndexNotFoundException infex)
            {
                log.warn("No index found in given directory, caused by:", infex.getMessage());
            }
            catch (Exception e)
            {
                log.error("Error while instantiating LuceneIndexer, Caused by :.", e);
                throw new LuceneIndexingException(e);
            }
        }
        return reader;
    }
1060474
public Object opt(int index) {

        return ((index < 0) || (index >= length())) ? null : m_myArrayList.get(index);
    }
542076
public void refresh(String index) throws IOException {
        logger.debug("refresh index [{}]", index);
        RefreshRequest request = new RefreshRequest();
        if (!isNullOrEmpty(index)) {
            request.indices(index);
        }
        RefreshResponse refresh = client.indices().refresh(request, RequestOptions.DEFAULT);
        logger.trace("refresh response: {}", refresh);
    }
809131
public static PathMetadata forArrayAccess(Path<?> parent, @Nonnegative int index) {
        return new PathMetadata(parent, index, PathType.ARRAYVALUE_CONSTANT);
    }
1201517
private void readAllImagesAndVariations(String root) {

        File basedir = new File(CmsImageLoader.getImageRepositoryPath() + root);
        visitImages(m_clonedCms, basedir);
        m_variations = Collections.unmodifiableMap(m_variations);
        m_sizes = Collections.unmodifiableMap(m_sizes);
        m_lengths = Collections.unmodifiableMap(m_lengths);

    }
76291
public int locateIndex(int index) {

        int min = 0;
        int max = this.indexValues.length - 1;

        if (max == -1) {
            return -1;
        }

        // Binary search
        while ((this.indexValues[min] <= index) && (this.indexValues[max] >= index)) {
            int current = (max + min) / 2;
            if (this.indexValues[current] > index) {
                max = current - 1;
            } else if (this.indexValues[current] < index) {
                min = current + 1;
            } else {
                return current;
            }
        }
        if (this.indexValues[max] < index) {
            return max;
        } else {
            return min - 1;
        }
    }
412727
@Override
    public String getURI(int index) {
        if (index < 0 || index >= attributesList.size()) {
            return null;
        }
        return attributesList.get(index).nameSpace;
    }