My settings:
Elasticsearch version ( bin/elasticsearch --version
):
5.6.11
Plugins installed :
JVM version ( java -version
):
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
OS version ( uname -a
if on a Unix-like system):
Linux myserver 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Hi all,
I'm wondering how I could determine a difference of the results within the resulted documents with the same query?
For Example:
On Monday I perform the query:
{
"query": {
"bool": {
"must": [
{
"nested": {
"path": "transactions",
"query": {
"range": {
"transactions.date": {
"gte": "2000-01-01",
"lte": "2019-12-31"
}
}
}
}
}
]
}
},
"size": 500,
"_source": [
"transactions"
]
}
In this example I get 205 results.
On Friday I perform the same query as above
I get 205 results again, BUT within one of the transactions in one of the documents, something has changed.
How would I be able to determine such a change?
I tried to google for quite a while without any concrete results or people with similar problems.
I came up with a solution in theory and would like have some opinions, its as follows:
- I would; Compute a hash of the transactions within the document, perhaps the whole array computed as a hash and put this hash into the document as a seperate field.
- Use this hash for comparison when I perform the same search later and compare the hashes from the result to the ones stored in my DB.
Thanks in advance!