On Mon, Oct 19, 2020 at 02:48:24PM +0800, Zhang Yuhang wrote:
Signed-off-by: Zhang Yuhang zhangyuhang25@huawei.com
lib/es_query.rb | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/lib/es_query.rb b/lib/es_query.rb index aaaadc2..9a4e45a 100644 --- a/lib/es_query.rb +++ b/lib/es_query.rb @@ -9,12 +9,20 @@ require_relative 'constants.rb' class ESQuery HOST = (ENV.key?('ES_HOST') ? ENV['ES_HOST'] : ES_HOST) PORT = (ENV.key?('ES_PORT') ? ENV['ES_PORT'] : ES_PORT).to_i
- def initialize(host = HOST, port = PORT, index: 'jobs')
- def initialize(host = HOST, port = PORT, index: 'jobs*')
with this (index: 'jobs*'), seems will get nil if use ESQuery like this: es = ESQuery.new query_result = es.query_by_id('crystal.89912')
Thanks, Weitao
2.23.0