I'm totally new to AWS ElasticSearch Service.
First I tried to establish connection using python, It was successful.
Then I tried to get a single record from a specific index and bulk records from an index using query. Like:
df = es.get(index="demo_data", doc_type="_doc", id="2") -- For getting single record
result_dict = es.search(index="demo_data", body={"query": {"match_all": {}}}) -- For getting Bulk Records
Now, I've been trying to fetch only newly inserted records i.e.(It can be a single record or a bulk of records)from that same index based on date using query, but I couldn't get an exact reference, I tried several ways like filter query with sort etc... Which either gets me the last record of the index or all the records in descending order.
I couldn't able to get the exact new records based on the date from my previous load.
Help is much appreciated. Thanks in Advance...
https://stackoverflow.com/questions/67212365/how-to-get-newly-inserted-records-based-on-date-from-aws-elasticsearch-index-usi April 22, 2021 at 07:28PM
没有评论:
发表评论