• Make significant terms work on fields that are indexed with points. e…

    …lastic#18031
    
    It will keep using the caching terms enum for keyword/text fields and falls back
    to IndexSearcher.count for fields that do not use the inverted index for
    searching (such as numbers and ip addresses). Note that this probably means that
    significant terms aggregations on these fields will be less efficient than they
    used to be. It should be ok under a sampler aggregation though.
    
    This moves tests back to the state they were in before numbers started using
    points, and also adds a new test that significant terms aggs fail if a field is
    not indexed.
    
    In the long term, we might want to follow the approach that Robert initially
    proposed that consists in collecting all documents from the background filter in
    order to compute frequencies using doc values. This would also mean that
    significant terms aggregations do not require fields to be indexed anymore.
    jpountz committed May 11, 2016