# How to filter tweets of logstash\_input\_twiiter based on timestapm?

**URL:** <https://discuss.elastic.co/t/how-to-filter-tweets-of-logstash-input-twiiter-based-on-timestapm/66340>\
**Category:** Logstash\
**Created:** [November 17, 2016, 7:28am UTC](https://discuss.elastic.co/t/how-to-filter-tweets-of-logstash-input-twiiter-based-on-timestapm/66340 "2016-11-17T07:28:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jamal](https://discuss.elastic.co/u/jamal)\
**Post date:** [November 17, 2016, 7:28am UTC](https://discuss.elastic.co/t/how-to-filter-tweets-of-logstash-input-twiiter-based-on-timestapm/66340/1 "2016-11-17T07:28:46Z")

</div>

here is my twitter input tweets

"\_source": {  
"created\_at": "Wed Aug 10 06:42:48 +0000 2016",  
"id": 763264318242783200,  
"timestamp\_ms": "1470811368891",  
"@version": "1",  
"@timestamp": "2016-08-10T06:42:48.000Z"  
}

and my logstash config file which include twitter input plugin filter and output

input {  
twitter {  
consumer\_key =\> "lvvoeonCRBOHsLAoTPbion9sK"  
consumer\_secret =\> "GNHOFzErJhuo0bNq38JUs7xea2BOktMiLa7tunoGwP0oFKCHrY"  
oauth\_token =\> "704578110616936448-gfeSklNrITu7fHIZgjw3nwoZ1S0l0Jl"  
oauth\_token\_secret =\> "IHiyRJRN09jjdUTGrnesALw4DRle35WyX7pdnI3CtEnJ5"  
keywords =\> ["afghanistan", "TOLOnews", "kabul", "police"]  
full\_tweet =\> true  
}  
}  
filter {  
date {  
match =\> ["timestamp" , "MMM d YYY HH:mm:ss", "ISO8601"]  
}  
}  
output {  
stdout { codec =\> dots }  
elasticsearch {  
hosts =\> "10.20.1.123"  
index =\> "twitter\_news"  
document\_type =\> "tweets"  
}  
}

I want to just get new tweets for example today date is 2016-11-16, then I just want to get tweets that have @timestamp= 2016-11-16 not @timestamp= 2016-11-15 or past days tweets, but with this configuration i get past tweets as well, any one help me to how do this ?

---

<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:** [December 15, 2016, 7:29am UTC](https://discuss.elastic.co/t/how-to-filter-tweets-of-logstash-input-twiiter-based-on-timestapm/66340/2 "2016-12-15T07:29:38Z")

</div>

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