Examples of indices()


Examples of org.elasticsearch.client.AdminClient.indices()

     */
    public static boolean existsIndex(String indexName) {

        Client client = IndexClient.client;
        AdminClient admin = client.admin();
        IndicesAdminClient indices = admin.indices();
        IndicesExistsRequestBuilder indicesExistsRequestBuilder = indices.prepareExists(indexName);
        IndicesExistsResponse response = indicesExistsRequestBuilder.execute().actionGet();

        return response.isExists();
    }
View Full Code Here

Examples of org.elasticsearch.cluster.metadata.MetaData.indices()

                    MetaData metaData = response.state().metaData();
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();

                    if (indices.length == 1 && types.size() == 1) {
                        if (metaData.indices().isEmpty()) {
                            channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indices[0]))));
                            return;
                        }
                        boolean foundType = false;
                        IndexMetaData indexMetaData = metaData.iterator().next();
View Full Code Here

Examples of org.elasticsearch.cluster.metadata.MetaData.indices()

        MetaData metaData = response.getState().metaData();

        builder.startObject();

        if (metaData.indices().isEmpty()) {
            return builder.endObject();
        }

        Set<String> typesSet;
        if (types != null) {
View Full Code Here

Examples of org.elasticsearch.cluster.metadata.MetaData.indices()

    @Override
    protected XContentBuilder toXContent(ClusterStateRequest request, ClusterStateResponse response, XContentBuilder builder) throws IOException {
        MetaData metaData = response.getState().metaData();

        if (metaData.indices().isEmpty()) {
            return builder.startObject().endObject();
        }

        builder.startObject();
        for (IndexMetaData indexMetaData : metaData) {
View Full Code Here

Examples of org.fnlp.ml.types.sv.HashSparseVector.indices()

          break;
        default:
          writer.write("S");
        }
        writer.write(" ");
        int[] idx = features.indices();
        Arrays.sort(idx);
        for (int i = 0; i < idx.length; i++) {
          writer.write(String.valueOf(idx[i]));
          writer.write(" ");
        }
View Full Code Here

Examples of org.fnlp.ml.types.sv.HashSparseVector.indices()

   * @throws UnsupportedDataTypeException
   */
  private float[][] estimateActions(ParsingState state) throws UnsupportedDataTypeException {
    // 当前状态的特征
    HashSparseVector features = state.getFeatures();
    Instance inst = new Instance(features.indices());

    String pos = state.getLeftPos();
    int lpos = postagAlphabet.lookupIndex(pos);
    if(lpos==-1)
      throw new UnsupportedDataTypeException("不支持词性:"+pos);
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.