elasticsearch Elasticsearch索引文档计数增加,但通配符搜索返回的结果很少,elasticsearch,indexing,elasticsearch,Indexing" /> elasticsearch Elasticsearch索引文档计数增加,但通配符搜索返回的结果很少,elasticsearch,indexing,elasticsearch,Indexing" />

elasticsearch Elasticsearch索引文档计数增加,但通配符搜索返回的结果很少

elasticsearch Elasticsearch索引文档计数增加,但通配符搜索返回的结果很少,elasticsearch,indexing,elasticsearch,Indexing,在下面的屏幕截图中,您可以看到第三个索引向下报告23007个文档;随着我加入更多,这个数字在不断增长 但是,搜索*会返回少量结果-列表中几乎有10项(您还可以看到文档数量增加): 完整索引统计数据也显示了正确的文档数量(见下文) 为什么我的搜索没有结果 { _shards: { total: 10, successful: 5, failed: 0 }, _all: { primaries: { docs: { coun

在下面的屏幕截图中,您可以看到第三个索引向下报告23007个文档;随着我加入更多,这个数字在不断增长

但是,搜索
*
会返回少量结果-列表中几乎有10项(您还可以看到文档数量增加):

完整索引统计数据也显示了正确的文档数量(见下文)

为什么我的搜索没有结果

{
  _shards: {
    total: 10,
    successful: 5,
    failed: 0
  },
  _all: {
    primaries: {
      docs: {
        count: 23100,
        deleted: 0
      },
      store: {
        size_in_bytes: 11348324,
        throttle_time_in_millis: 0
      },
      indexing: {
        index_total: 23101,
        index_time_in_millis: 24349,
        index_current: 0,
        index_failed: 0,
        delete_total: 0,
        delete_time_in_millis: 0,
        delete_current: 0,
        noop_update_total: 0,
        is_throttled: false,
        throttle_time_in_millis: 0
      },
      get: {
        total: 0,
        time_in_millis: 0,
        exists_total: 0,
        exists_time_in_millis: 0,
        missing_total: 0,
        missing_time_in_millis: 0,
        current: 0
      },
      search: {
        open_contexts: 0,
        query_total: 95,
        query_time_in_millis: 419,
        query_current: 0,
        fetch_total: 7,
        fetch_time_in_millis: 0,
        fetch_current: 0,
        scroll_total: 0,
        scroll_time_in_millis: 0,
        scroll_current: 0,
        suggest_total: 0,
        suggest_time_in_millis: 0,
        suggest_current: 0
      },
      merges: {
        current: 0,
        current_docs: 0,
        current_size_in_bytes: 0,
        total: 2242,
        total_time_in_millis: 96945,
        total_docs: 5153202,
        total_size_in_bytes: 2215505488,
        total_stopped_time_in_millis: 0,
        total_throttled_time_in_millis: 0,
        total_auto_throttle_in_bytes: 104857600
      },
      refresh: {
        total: 22256,
        total_time_in_millis: 113459,
        listeners: 0
      },
      flush: {
        total: 0,
        total_time_in_millis: 0
      },
      warmer: {
        current: 0,
        total: 22261,
        total_time_in_millis: 6075
      },
      query_cache: {
        memory_size_in_bytes: 0,
        total_count: 0,
        hit_count: 0,
        miss_count: 0,
        cache_size: 0,
        cache_count: 0,
        evictions: 0
      },
      fielddata: {
        memory_size_in_bytes: 0,
        evictions: 0
      },
      completion: {
        size_in_bytes: 0
      },
      segments: {
        count: 23,
        memory_in_bytes: 78139,
        terms_memory_in_bytes: 63216,
        stored_fields_memory_in_bytes: 7920,
        term_vectors_memory_in_bytes: 0,
        norms_memory_in_bytes: 4416,
        points_memory_in_bytes: 183,
        doc_values_memory_in_bytes: 2404,
        index_writer_memory_in_bytes: 343400,
        version_map_memory_in_bytes: 128,
        fixed_bit_set_memory_in_bytes: 0,
        max_unsafe_auto_id_timestamp: -1,
        file_sizes: {

        }
      },
      translog: {
        operations: 23101,
        size_in_bytes: 6517625
      },
      request_cache: {
        memory_size_in_bytes: 0,
        evictions: 0,
        hit_count: 0,
        miss_count: 0
      },
      recovery: {
        current_as_source: 0,
        current_as_target: 0,
        throttle_time_in_millis: 0
      }
    },
    total: {
      docs: {
        count: 23100,
        deleted: 0
      },
      store: {
        size_in_bytes: 11348324,
        throttle_time_in_millis: 0
      },
      indexing: {
        index_total: 23101,
        index_time_in_millis: 24349,
        index_current: 0,
        index_failed: 0,
        delete_total: 0,
        delete_time_in_millis: 0,
        delete_current: 0,
        noop_update_total: 0,
        is_throttled: false,
        throttle_time_in_millis: 0
      },
      get: {
        total: 0,
        time_in_millis: 0,
        exists_total: 0,
        exists_time_in_millis: 0,
        missing_total: 0,
        missing_time_in_millis: 0,
        current: 0
      },
      search: {
        open_contexts: 0,
        query_total: 95,
        query_time_in_millis: 419,
        query_current: 0,
        fetch_total: 7,
        fetch_time_in_millis: 0,
        fetch_current: 0,
        scroll_total: 0,
        scroll_time_in_millis: 0,
        scroll_current: 0,
        suggest_total: 0,
        suggest_time_in_millis: 0,
        suggest_current: 0
      },
      merges: {
        current: 0,
        current_docs: 0,
        current_size_in_bytes: 0,
        total: 2242,
        total_time_in_millis: 96945,
        total_docs: 5153202,
        total_size_in_bytes: 2215505488,
        total_stopped_time_in_millis: 0,
        total_throttled_time_in_millis: 0,
        total_auto_throttle_in_bytes: 104857600
      },
      refresh: {
        total: 22256,
        total_time_in_millis: 113459,
        listeners: 0
      },
      flush: {
        total: 0,
        total_time_in_millis: 0
      },
      warmer: {
        current: 0,
        total: 22261,
        total_time_in_millis: 6075
      },
      query_cache: {
        memory_size_in_bytes: 0,
        total_count: 0,
        hit_count: 0,
        miss_count: 0,
        cache_size: 0,
        cache_count: 0,
        evictions: 0
      },
      fielddata: {
        memory_size_in_bytes: 0,
        evictions: 0
      },
      completion: {
        size_in_bytes: 0
      },
      segments: {
        count: 23,
        memory_in_bytes: 78139,
        terms_memory_in_bytes: 63216,
        stored_fields_memory_in_bytes: 7920,
        term_vectors_memory_in_bytes: 0,
        norms_memory_in_bytes: 4416,
        points_memory_in_bytes: 183,
        doc_values_memory_in_bytes: 2404,
        index_writer_memory_in_bytes: 343400,
        version_map_memory_in_bytes: 128,
        fixed_bit_set_memory_in_bytes: 0,
        max_unsafe_auto_id_timestamp: -1,
        file_sizes: {

        }
      },
      translog: {
        operations: 23101,
        size_in_bytes: 6517625
      },
      request_cache: {
        memory_size_in_bytes: 0,
        evictions: 0,
        hit_count: 0,
        miss_count: 0
      },
      recovery: {
        current_as_source: 0,
        current_as_target: 0,
        throttle_time_in_millis: 0
      }
    }
  },
  indices: {
    blablaindex: {
      primaries: {
        docs: {
          count: 23100,
          deleted: 0
        },
        store: {
          size_in_bytes: 11348324,
          throttle_time_in_millis: 0
        },
        indexing: {
          index_total: 23101,
          index_time_in_millis: 24349,
          index_current: 0,
          index_failed: 0,
          delete_total: 0,
          delete_time_in_millis: 0,
          delete_current: 0,
          noop_update_total: 0,
          is_throttled: false,
          throttle_time_in_millis: 0
        },
        get: {
          total: 0,
          time_in_millis: 0,
          exists_total: 0,
          exists_time_in_millis: 0,
          missing_total: 0,
          missing_time_in_millis: 0,
          current: 0
        },
        search: {
          open_contexts: 0,
          query_total: 95,
          query_time_in_millis: 419,
          query_current: 0,
          fetch_total: 7,
          fetch_time_in_millis: 0,
          fetch_current: 0,
          scroll_total: 0,
          scroll_time_in_millis: 0,
          scroll_current: 0,
          suggest_total: 0,
          suggest_time_in_millis: 0,
          suggest_current: 0
        },
        merges: {
          current: 0,
          current_docs: 0,
          current_size_in_bytes: 0,
          total: 2242,
          total_time_in_millis: 96945,
          total_docs: 5153202,
          total_size_in_bytes: 2215505488,
          total_stopped_time_in_millis: 0,
          total_throttled_time_in_millis: 0,
          total_auto_throttle_in_bytes: 104857600
        },
        refresh: {
          total: 22256,
          total_time_in_millis: 113459,
          listeners: 0
        },
        flush: {
          total: 0,
          total_time_in_millis: 0
        },
        warmer: {
          current: 0,
          total: 22261,
          total_time_in_millis: 6075
        },
        query_cache: {
          memory_size_in_bytes: 0,
          total_count: 0,
          hit_count: 0,
          miss_count: 0,
          cache_size: 0,
          cache_count: 0,
          evictions: 0
        },
        fielddata: {
          memory_size_in_bytes: 0,
          evictions: 0
        },
        completion: {
          size_in_bytes: 0
        },
        segments: {
          count: 23,
          memory_in_bytes: 78139,
          terms_memory_in_bytes: 63216,
          stored_fields_memory_in_bytes: 7920,
          term_vectors_memory_in_bytes: 0,
          norms_memory_in_bytes: 4416,
          points_memory_in_bytes: 183,
          doc_values_memory_in_bytes: 2404,
          index_writer_memory_in_bytes: 343400,
          version_map_memory_in_bytes: 128,
          fixed_bit_set_memory_in_bytes: 0,
          max_unsafe_auto_id_timestamp: -1,
          file_sizes: {

          }
        },
        translog: {
          operations: 23101,
          size_in_bytes: 6517625
        },
        request_cache: {
          memory_size_in_bytes: 0,
          evictions: 0,
          hit_count: 0,
          miss_count: 0
        },
        recovery: {
          current_as_source: 0,
          current_as_target: 0,
          throttle_time_in_millis: 0
        }
      },
      total: {
        docs: {
          count: 23100,
          deleted: 0
        },
        store: {
          size_in_bytes: 11348324,
          throttle_time_in_millis: 0
        },
        indexing: {
          index_total: 23101,
          index_time_in_millis: 24349,
          index_current: 0,
          index_failed: 0,
          delete_total: 0,
          delete_time_in_millis: 0,
          delete_current: 0,
          noop_update_total: 0,
          is_throttled: false,
          throttle_time_in_millis: 0
        },
        get: {
          total: 0,
          time_in_millis: 0,
          exists_total: 0,
          exists_time_in_millis: 0,
          missing_total: 0,
          missing_time_in_millis: 0,
          current: 0
        },
        search: {
          open_contexts: 0,
          query_total: 95,
          query_time_in_millis: 419,
          query_current: 0,
          fetch_total: 7,
          fetch_time_in_millis: 0,
          fetch_current: 0,
          scroll_total: 0,
          scroll_time_in_millis: 0,
          scroll_current: 0,
          suggest_total: 0,
          suggest_time_in_millis: 0,
          suggest_current: 0
        },
        merges: {
          current: 0,
          current_docs: 0,
          current_size_in_bytes: 0,
          total: 2242,
          total_time_in_millis: 96945,
          total_docs: 5153202,
          total_size_in_bytes: 2215505488,
          total_stopped_time_in_millis: 0,
          total_throttled_time_in_millis: 0,
          total_auto_throttle_in_bytes: 104857600
        },
        refresh: {
          total: 22256,
          total_time_in_millis: 113459,
          listeners: 0
        },
        flush: {
          total: 0,
          total_time_in_millis: 0
        },
        warmer: {
          current: 0,
          total: 22261,
          total_time_in_millis: 6075
        },
        query_cache: {
          memory_size_in_bytes: 0,
          total_count: 0,
          hit_count: 0,
          miss_count: 0,
          cache_size: 0,
          cache_count: 0,
          evictions: 0
        },
        fielddata: {
          memory_size_in_bytes: 0,
          evictions: 0
        },
        completion: {
          size_in_bytes: 0
        },
        segments: {
          count: 23,
          memory_in_bytes: 78139,
          terms_memory_in_bytes: 63216,
          stored_fields_memory_in_bytes: 7920,
          term_vectors_memory_in_bytes: 0,
          norms_memory_in_bytes: 4416,
          points_memory_in_bytes: 183,
          doc_values_memory_in_bytes: 2404,
          index_writer_memory_in_bytes: 343400,
          version_map_memory_in_bytes: 128,
          fixed_bit_set_memory_in_bytes: 0,
          max_unsafe_auto_id_timestamp: -1,
          file_sizes: {

          }
        },
        translog: {
          operations: 23101,
          size_in_bytes: 6517625
        },
        request_cache: {
          memory_size_in_bytes: 0,
          evictions: 0,
          hit_count: 0,
          miss_count: 0
        },
        recovery: {
          current_as_source: 0,
          current_as_target: 0,
          throttle_time_in_millis: 0
        }
      }
    }
  }
}

你的问题很好。由于默认参数,ES默认只返回10个结果。检查总的内部命中率对象,它显示23100,如果你想迭代所有结果,你可以使用@ChintanShah25,这是一个很好的提示-我不知道这表明我没有正确的RTFMing。我似乎仍然有一个问题,但它看起来时区相关。尽管不断添加文档,但最近的时间戳是4小时前。我是UTC-4,所以我不认为这是巧合。我在Kibana也看到了同样的事情。我的浏览器时区是UTC-4,运行Elasticsearch和Kibana的服务器也是UTC-4。所以我还有一些额外的故障排除要做。