Skip to content

Instantly share code, notes, and snippets.

View lukas-vlcek's full-sized avatar

Lukáš Vlček lukas-vlcek

View GitHub Profile
@lukas-vlcek
lukas-vlcek / gist:4722341
Created February 6, 2013 12:52
Elasticsearch 0.21.0.Beta1 issue
# My version of ES build
git log --oneline -n 1
ed09ba0 Improve stability of RecoveryPercolatorTests
# make sure fresh instance is started
ps -ef | grep elasticsearch
rm -rf data/ logs/
./bin/elasticsearch
@lukas-vlcek
lukas-vlcek / gist:4673027
Last active January 19, 2021 15:03
Čeština v elasticsearch
#!/bin/sh
# download
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.4.zip
# unzip and start
unzip elasticsearch-0.20.4.zip
cd elasticsearch-0.20.4
# remove data in case you have defined some analyzers in the past (e.g. stop/start)
rm -rf data/
#!/bin/sh
echo "\n --- delete index"
curl -X DELETE 'http://localhost:9200/'
echo "\n --- create index and put mapping into place"
curl -X POST 'http://localhost:9200/myindex/' -d '{
"mappings" : {
"person" : {
"properties" : {
# ########################
# Create mapping for Parent / Child
curl -X POST 'http://localhost:9200/families/' -d '{
"mappings" : {
"family" : {
"properties" : {
"name" : {"type" : "string", "store" : "yes"}
}
},
@lukas-vlcek
lukas-vlcek / gist:3624163
Created September 4, 2012 17:54
TabletMagic error
Process: System Preferences [2324]
Path: /Applications/System Preferences.app/Contents/MacOS/System Preferences
Identifier: com.apple.systempreferences
Version: 12.0 (12.0)
Build Info: SystemPrefsApp-232000000000000~22
Code Type: X86-64 (Native)
Parent Process: launchd [229]
User ID: 501
PlugIn Path: /Users/USER/Library/PreferencePanes/TabletMagic.prefPane/Contents/MacOS/TabletMagic
@lukas-vlcek
lukas-vlcek / gist:2594142
Created May 4, 2012 11:03
highcharts.ant.dist#3
Buildfile: build.xml
set.properties:
clean:
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/modules
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/modules
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highstock/js/adapters
@lukas-vlcek
lukas-vlcek / gist:2594123
Created May 4, 2012 10:57
highcharts.ant.dist#2
Buildfile: build.xml
set.properties:
clean:
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/modules
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/modules
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highstock/js/adapters
@lukas-vlcek
lukas-vlcek / gist:2594024
Created May 4, 2012 10:38
highcharts.ant.dist
$ ant dist
Buildfile: build.xml
set.properties:
clean:
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/js/modules
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/adapters
[mkdir] Created dir: /home/lukas/projects/highcharts/highcharts.com/build/dist/highcharts/js/modules
@lukas-vlcek
lukas-vlcek / gist:1680067
Created January 26, 2012 00:45
Phrase search (out of the box 0.18.7)
#!/bin/sh
curl -X DELETE 'localhost:9200/i/t'
curl -X PUT 'localhost:9200/i/t/1' -d '{"f":"Lorem ipsum Robert E. Anderson dolor sit amet."}'
curl -X PUT 'localhost:9200/i/t/2' -d '{"f":"Lorem ipsum Robert Johnson."}'
curl -X POST 'localhost:9200/_refresh'
echo "\n\nSearch for \"Robert Johnson\"\n"
curl -X GET 'localhost:9200/_search?pretty=true' -d '{"fields":["f"],"query":{"query_string":{"query":"\"Robert Johnson\""}}}'
echo "\n\nSearch for \"Robert E. Anderson\"\n"
curl -X GET 'localhost:9200/_search?pretty=true' -d '{"fields":["f"],"query":{"query_string":{"query":"\"Robert E. Anderson\""}}}'
@lukas-vlcek
lukas-vlcek / gist:1606335
Created January 13, 2012 13:55
Broken plugin in
Download http://elasticsearch.googlecode.com/svn/plugins/mapper-attachments/elasticsearch-mapper-attachments-0.18.7.zip
And extract locally:
$ unzip elasticsearch-mapper-attachments-0.18.7.zip
Archive: elasticsearch-mapper-attachments-0.18.7.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.