Ludovic Boutros created CAMEL-13071:
---------------------------------------

             Summary: Elasticsearch rest component should support scroll api
                 Key: CAMEL-13071
                 URL: https://issues.apache.org/jira/browse/CAMEL-13071
             Project: Camel
          Issue Type: New Feature
          Components: camel-elasticsearch-rest
    Affects Versions: 2.23.0
            Reporter: Ludovic Boutros


On some project we need to fetch all results from Elasticsearch.

This is currently quite difficult.

Here is an example of usage that could be implemented:
{code:java|title=ElasticsearchRouter.java|borderStyle=solid}
from("direct:search")
  
.to("elasticsearch-rest://elasticsearch?operation=Search&indexName=twitter&indexType=tweet&useScroll=true&scrollKeepAliveMs=30000")
  .split()
  .body()
  .streaming()
  .to("mock:output")
  .end();
{code}
Two new parameters could be used:
 * useScroll: enable scroll usage
 * scrollKeepAliveMs: time in ms during which elasticsearch will keep search 
context alive



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to