Let's say I have this type of data in ElasticSearch:
name <other fields>
aa ...
bb ...
cc ...
bb ...
dd ...
ee ...
ff ...
aa ...
gg ...
and so on.
I would like to know if there is a way to use the query bar in Kibana, to display only those docs that have a common value of "name". Or, to say to opposite, filter those docs whose "name" is unique.
The result would be like this:
name <other fields>
aa ...
bb ...
bb ...
aa ...
as 'aa' and 'bb' are the only values that show up more than once.
Is this doable?
thanks @thomasneirynck for a so prompt response. I need to read carefully the documentation, as I never touched the advance settings, I don't want to break anything
Hmm. Maybe there is an easier way, that does not requires playing with the delicate "advance settings"?
One of the other fields in my docs happens to be a counter. So the data actually looks like this:
name counter <other fields>
aa 1 ...
bb 1 ...
cc 1 ...
bb 2 ...
dd 1 ...
ee 1 ...
ff 1 ...
aa 2 ...
gg 1 ...
and, therefore, the result of the query I am looking for would be like this:
name counter <other fields>
aa 1 ...
bb 1 ...
bb 2 ...
aa 2 ...
Is it possible to leverage somehow the existence of that counter thru the query bar?
Something equivalent to (WARNING: pseudo-code) this?
SELECT * WHERE name = ( SELECT name WHERE counter > 1 )
Nope. Sorry I was not clear. Note that in my examples, I included "other fields". They are different. And that is what I want to see. All fields for all documents with a value for "name" (any value) that appears more than once.
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.