Hello
is there a way to tag a document with "first occurrence of a field" using an ingest processor?
for example first occurrence of traffic from Japan (country:Japan)
thanks
Hello
is there a way to tag a document with "first occurrence of a field" using an ingest processor?
for example first occurrence of traffic from Japan (country:Japan)
thanks
Would it be easier to derive on the fly? This is an example query to find the first uses of popular tags on stackoverflow:
GET stackoverflow/_search
{
"size":0,
"aggs":{
"tags":{
"terms":{
"field": "tag",
"collect_mode":"breadth_first"
},
"aggs":{
"first_use":{
"top_hits": {
"size": 1,
"sort":[{ "creationDate" : {"order" : "asc"}}]
}
}
}
}
}
}
nice thanks!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.