Elastic search match_all filter only return all document when size is specified

Inside db there 250 tags, when use bellow query it's just returns 5 of them

   const { body } = await elasticWrapper.client.search({
        index: ElasticIndex.Tags,
        filter_path: 'hits.hits._source*',
        body: {
          query: {
            match_all: {},
          },
        },
      });

but when I specified the size only then it's return all of them

   const { body } = await elasticWrapper.client.search({
        index: ElasticIndex.Tags,
        filter_path: 'hits.hits._source*',
        body: {
          from: 0,
          size: 250,
          query: {
            match_all: {},
          },
        },
      });


Read more here: https://stackoverflow.com/questions/68461849/elastic-search-match-all-filter-only-return-all-document-when-size-is-specified

Content Attribution

This content was originally published by Lord at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: