This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [Thu Mar 10 14:48:46 2011] Protocol: http, Server: 127.0.0.1:9200 | |
curl -XPUT 'http://127.0.0.1:9200/foo/' -d ' | |
{} | |
' | |
# [Thu Mar 10 14:48:46 2011] Response: | |
# { | |
# "ok" : true, | |
# "acknowledged" : true | |
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $Invalid_XML = qr/[^ | |
\x{9}\x{A}\x{D} | |
\x{20}-\x{D7FF} | |
\x{E000}-\x{FFFD} | |
\x{10000}-\x{10FFFF} | |
]/x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [Sun Mar 13 19:03:04 2011] Protocol: http, Server: 127.0.0.1:9201 | |
curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty=1&timeout=30s&wait_for_status=green' | |
# [Sun Mar 13 19:03:04 2011] Response: | |
# { | |
# "number_of_data_nodes" : 3, | |
# "relocating_shards" : 0, | |
# "active_shards" : 16, | |
# "status" : "green", | |
# "cluster_name" : "es_test", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT 'http://127.0.0.1:9200/foo/?pretty=1' -d ' | |
{ | |
"mappings" : { | |
"item" : { | |
"properties" : { | |
"category" : { | |
"type" : "object", | |
"include_in_all" : 0, | |
"properties" : { | |
"name" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE localhost:9200/test | |
curl -XPUT 'localhost:9200/test?pretty=1' -d ' | |
{ | |
"settings":{ | |
"analysis": { | |
"analyzer": { | |
"camel":{ | |
"type": "pattern", | |
"lowercase": true, | |
"pattern":"([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################### | |
# CREATE THE INDEX: | |
################### | |
curl -XPUT 'http://127.0.0.1:9200/test/?pretty=1' -d ' | |
{ | |
"settings" : { | |
"analysis" : { | |
"filter" : { | |
"edge_ngram" : { | |
"side" : "front", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use URI; | |
use Web::Scraper; | |
use ElasticSearch(); | |
my $url = URI->new("http://www.elasticsearch.org/blog"); | |
my $es = ElasticSearch->new( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use ElasticSearch(); | |
my $es = ElasticSearch->new( | |
servers => 'localhost:9200', | |
use_index => 'es_blogs', | |
use_type => 'post' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [Thu Jun 2 18:14:46 2011] Protocol: http, Server: 192.168.5.103:9200 | |
curl -XDELETE 'http://127.0.0.1:9200/twitter/?pretty=1' | |
# [Thu Jun 2 18:14:46 2011] Response: | |
# { | |
# "ok" : true, | |
# "acknowledged" : true | |
# } | |
# [Thu Jun 2 18:14:48 2011] Protocol: http, Server: 192.168.5.103:9200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: XXXXXXXXXXXXXXXX | |
Title: Please can you send me an invoice for the above booking, It should be addressed ... | |
Date: 03/06/2011 | |
Our Reference: XXXXXXXXXXXXXX | |
Booking Reference: XXXXXXXXXXX | |
3rd June 2011 | |
Dear Mr XXXXXXXXXXX, |