Examples of indexRequest()


Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()

      return this;
    }

    public IndexRequestBuilder toIndexRequest(Object object) {
      TypeMapping mapping = _context.findTypeMapping(object);
      return mapping.indexRequest(_client, _indexName, object);
    }

    public Session delete(Object o) {
      TypeMapping mapping = _context.findTypeMapping(o);
      delete(mapping.getTypeClass(), mapping.getId(o), mapping.getVersion(o));
View Full Code Here

Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()

      public ListenableActionFuture<BulkResponse> execute(Client client, String indexName, OperationContext helper) {
        BulkRequestBuilder request = client.prepareBulk();

        for (Object o : iterable) {
          TypeMapping mapping = helper.findTypeMapping(o);
          IndexRequestBuilder index = mapping.indexRequest(client, indexName, o);
          if (index != null) {
            request.add(index);
          }
        }
View Full Code Here

Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()

    @Override
    public ListenableActionFuture<IndexResponse> execute(Client client, String indexName, OperationContext helper) {
      final TypeMapping typeMapping = helper.findTypeMapping(_object);

      IndexRequestBuilder request = typeMapping.indexRequest(client, indexName, _object);
      if (request == null) {
        throw new Esi4JObjectFilteredException(typeMapping, _object);
      } else {
        return request.execute();
      }
View Full Code Here

Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()

      return this;
    }

    public IndexRequestBuilder toIndexRequest(Object object) {
      TypeMapping mapping = _context.findTypeMapping(object);
      return mapping.indexRequest(_client, _indexName, object);
    }

    public Session delete(Object o) {
      TypeMapping mapping = _context.findTypeMapping(o);
      delete(mapping.getTypeClass(), mapping.getId(o), mapping.getVersion(o));
View Full Code Here

Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()

  @Override
  public void addToBulk(BulkRequestBuilder bulk, String indexName, OperationContext context) {
    Object entity = getEntity();
    if (entity != null) {
      TypeMapping mapping = context.findTypeMapping(entity);
      IndexRequest index = mapping.indexRequest(indexName, entity);

      if (index != null) {
        bulk.add(index);
      } else {
        DeleteRequest delete = mapping.deleteRequest(indexName, entity);
View Full Code Here

Examples of org.xbib.elasticsearch.http.netty.client.NettyWebSocketClientFactory.indexRequest()

                        @Override
                        public void onConnect(WebSocketClient client) {
                            try {
                                logger.info("sending some index requests (longer than a single bulk size)");
                                for (int i = 0; i < 250; i++) {
                                    clientFactory.indexRequest()
                                            .data(jsonBuilder()                                           
                                            .startObject()
                                            .field("index", "test")
                                            .field("type", "test")
                                            .field("id", Integer.toString(i))
View Full Code Here

Examples of org.xbib.elasticsearch.websocket.client.WebSocketClientFactory.indexRequest()

                        @Override
                        public void onConnect(WebSocketClient client) {
                            try {
                                logger.info("sending some index requests (longer than a single bulk size)");
                                for (int i = 0; i < 250; i++) {
                                    clientFactory.indexRequest()
                                            .data(jsonBuilder()                                           
                                            .startObject()
                                            .field("index", "test")
                                            .field("type", "test")
                                            .field("id", Integer.toString(i))
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.