Merge pull request #6 from mashion/search-examples

Search examples
This commit is contained in:
cheddar 2012-10-29 09:08:34 -07:00
commit afb347f7ec
3 changed files with 17 additions and 2 deletions

View File

@ -7,14 +7,16 @@ shopt -s xpg_echo
shopt -s expand_aliases shopt -s expand_aliases
trap "exit 1" 1 2 3 15 trap "exit 1" 1 2 3 15
[ ! -e query.body ] && echo "expecting file query.body to be in current directory" && exit 2 QUERY_FILE="${1:-group_by}_query.body"
[ ! -e $QUERY_FILE ] && echo "expecting file $QUERY_FILE to be in current directory" && exit 2
for delay in 5 15 15 15 15 15 15 15 15 15 15 for delay in 5 15 15 15 15 15 15 15 15 15 15
do do
echo "sleep for $delay seconds..." echo "sleep for $delay seconds..."
echo " " echo " "
sleep $delay sleep $delay
curl -X POST 'http://localhost:8080/druid/v2/' -H 'content-type: application/json' -d @query.body curl -X POST 'http://localhost:8080/druid/v2/' -H 'content-type: application/json' -d @$QUERY_FILE
echo " " echo " "
echo " " echo " "
done done

View File

@ -0,0 +1,13 @@
{
"queryType": "search",
"dataSource": "twitterstream",
"granularity": "all",
"searchDimensions": ["htags"],
"limit": 1,
"query": {
"type": "fragment",
"values": ["men"],
"sort": { "type": "strlen" }
},
"intervals":["2012-10-01T00:00/2020-01-01T00"]
}