Skip to content

Instantly share code, notes, and snippets.

View Vineeth-Mohan's full-sized avatar

Vineeth Mohan Vineeth-Mohan

  • Factweavers
  • India
View GitHub Profile
curl -X PUT "http://$hostname:9200/index_name" -d '{
"index" : {
"number_of_shards" : 2,
"number_of_replicas" : 1 ,
"analysis":{
"analyzer":{
"html" : {
"type" : "custom",
"tokenizer" : "standard",
"filter" : ["lowercase" , "stop"],
"Source","Feed","Rank","Tags"
Barrons,http://online.barrons.com/xml/rss/3_7534.xml,5,News
Barrons,http://blogs.barrons.com/focusonfunds/feed/,5,Blog
Barrons,http://blogs.barrons.com/techtraderdaily/feed/,5,Blog
Barrons,http://blogs.barrons.com/stockstowatchtoday/feed/,5,Blog
Barrons,http://online.barrons.com/xml/rss/3_7563.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7560.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7533.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7535.xml,5,News
Barrons,http://online.barrons.com/xml/rss/3_7544.xml,5,News
{
_shard: 0
_node: HxxuvFBZR56hsdjeGBqA6Q
_index: logstash
_type: syslog
_id: aSJvz1mZSbGiYXeYTCwzzA
_score: 7.4697003
_source: {
message: # ethernet ports 32
@timestamp: 2013-12-13T10:36:18.972Z
{
"user_id": 22656,
"user_type": "registered",
"creation_date": 1222430705,
"display_name": "Jon Skeet",
"reputation": 623837,
"email_hash": "6d8ebb117e8d83d74ea95fbdd0f87e13",
"age": 37,
"last_access_date": 1384928518,
"website_url": "http://csharpindepth.com",
{
"tags": [
"ios",
"xcode",
"slide",
"navigationbar"
],
"answer_count": 1,
"answers": [
{
{
took: 70
timed_out: false
_shards: {
total: 1
successful: 1
failed: 0
}
hits: {
total: 1
{
"size": 2,
"query": {
"query_string": {
"query": "Event:large"
}
},
"highlight": {
"pre_tags": [
"<tag1>"
{
"tokens" : [ {
"token" : "big",
"start_offset" : 0,
"end_offset" : 5,
"type" : "SYNONYM",
"position" : 1
}, {
"token" : "enceinte",
"start_offset" : 0,
{
took: 314
timed_out: false
_shards: {
total: 2
successful: 2
failed: 0
}
hits: {
total: 1
#!/bin/bash
if [ -z $1 ] ; then
echo "Please enter hostname"
exit
fi
hostname=$1
for index in events ; do