What is difference between size in search and body


#1

Hello everyone

For instance, I have the following code:

page = es.search(
          index = 'index',
          scroll = '2m',
          size = 20,
          body = {
            "size":10,
            "query": {"match_all": {}}
            }
        )

There is size inside the search and another size inside body. What is the difference and what are the purpose of them?

Thank you


(Igor Motov) #2

I am not quite sure which language this is, but assuming this is javascript, the size inside the search will go on URI and the size in the body will remain in the body. If you specify both, the value in URI will be used.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.