Multiple Fields for Prefix in ElasticSearch and auto From and Size limit

Viewed 392

I got 2 questions related to ElasticSearch.

1) First Question, I have this query with prefix

"must": [
        {
           "prefix": {
              "user": "John"
           }
        }
     ]

with this query, I can Prefix John with User field so it results those documents in which John is found in User field. Now how can I make this query to see if John is prefixed in either any of User or email fields.


2) Second Question, I know we can apply Size and from in ElasticSearch to limit Result but I want to know that do I have to explicitly provide Size and from every time I query in ElasticSearch to continue last result or is there any other way to let the ElasticSearch do it for me that I just query and it will give results in a series left from previous.

1 Answers
Related