Database Reference
In-Depth Information
Monitoring your hashtag
You might be interested in seeing what kind of traffic a hashtag was getting at a particular
time. This could be to follow what people were saying about your company or a public fig-
ure. The search code to do this is presented here, for a hashtag of your choice, indicated
here by my_hashtag :
index=twitter
| rename entities.hashtags{}.text as hashtags
| fields hashtags
| mvexpand hashtags
| where like(hashtags,"my_hashtag")
| timechart count span=10d
Let's look at this code carefully. We show each pipe on a separate line, just to be clear.
We'll start with line 2, where we rename each instance of the text of the hashtag entity as
hashtags. In line 3, we limit our pool of data to the field hashtags . In line 4, we use the
mvexpand command to separate the hashtag field into multiple values, as we have seen
before. Then we look for a specific hashtag, which is given in quotes. Here, we have used
gameinsight in place of my_hashtag , which was a popular hashtag at the time this
topic was written. We then use the timechart command to find the count of hashtags
during the last 10 days:
Search WWH ::




Custom Search