# How to visualize "terms lookup twitter example" in kibana

**URL:** <https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950>\
**Category:** Kibana\
**Created:** [March 17, 2017, 2:30am UTC](https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950 "2017-03-17T02:30:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shun](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@shun](https://discuss.elastic.co/u/shun)\
**Post date:** [March 17, 2017, 2:30am UTC](https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950/1 "2017-03-17T02:30:19Z")

</div>

Elasticsearch reference gives a good example to combine 2 indices between tweets and users.  
GET /tweets/\_search  
{  
"query" : {  
"terms" : {  
"user" : {  
"index" : "users",  
"type" : "user",  
"id" : "2",  
"path" : "followers"  
}  
}  
}  
}  
ref link:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html)  
I have similar query and want to monitor the change daily, is it possible to visualize this kind of query in kibana?

Thanks,  
Shun

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [March 17, 2017, 11:00am UTC](https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950/2 "2017-03-17T11:00:13Z")

</div>

let's follow the reference you pasted:

in kibana i go to `Dev Tools` and execute the following two queries:

```auto
PUT /users/user/2
{
    "followers" : ["1", "3"]
}

PUT /tweets/tweet/1
{
    "user" : "1"
}

```

you could try adding more users and tweets ...

then go to `Management`/`Index Patterns` and add two new index patterns: `users` and `tweets`.

now go to the `Discover` and select `tweets` index pattern and enter this into your search:

`{"terms":{"user":{"id":"2","index":"users","path":"followers","type":"user"}}}`

you can `Save` this search now and use it in visualizations.

---

<div class="post-metadata">

**Author:** ![shun](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@shun](https://discuss.elastic.co/u/shun)\
**Post date:** [March 18, 2017, 4:20am UTC](https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950/3 "2017-03-18T04:20:31Z")

</div>

Thank you, it is great, this shows me the light of dawn.  
Further, I want to sum up each user by id and draw the increasing/decreasing trends daily in a chart.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2017, 4:20am UTC](https://discuss.elastic.co/t/how-to-visualize-terms-lookup-twitter-example-in-kibana/78950/4 "2017-04-15T04:20:33Z")

</div>

Closed on April 15, 2017, 4:20am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
