elasticsearch-dbapi icon indicating copy to clipboard operation
elasticsearch-dbapi copied to clipboard

Fix missing docs.count

Open james-stead opened this issue 2 years ago • 2 comments

Our Elastic cluster has a number of indexes that don't return this value. The indexes do appear to be empty as well from looking at the indexes in elastic. This is the for example is what is in item: {'health': 'green', 'status': 'open', 'index': '', 'uuid': 't_w0eDA9SXS8CGYhYtXhfg', 'pri': '1', 'rep': '1', 'docs.count': None, 'docs.deleted': None, 'store.size': None, 'pri.store.size': None}

james-stead avatar Apr 05 '22 02:04 james-stead

Codecov Report

Merging #91 (aae46d0) into master (7e48e57) will decrease coverage by 0.28%. The diff coverage is 57.14%.

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
- Coverage   94.40%   94.12%   -0.29%     
==========================================
  Files          15       15              
  Lines         966      970       +4     
==========================================
+ Hits          912      913       +1     
- Misses         54       57       +3     
Flag Coverage Δ
python 94.12% <57.14%> (-0.29%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
es/elastic/api.py 84.61% <57.14%> (-2.39%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7e48e57...aae46d0. Read the comment docs.

codecov-commenter avatar Apr 19 '22 20:04 codecov-commenter

Hi @james-stead,

Thank you for your contribution, looks good to me.

Can you please update your branch with the current master. I've just merged a PR that will fix CI lint step.

More completeness and stability would be super great if you could add a test to verify that an index without a count will behave has expected

dpgaspar avatar Apr 20 '22 08:04 dpgaspar