Skip to content

Instantly share code, notes, and snippets.

View Alex-Ikanow's full-sized avatar

Alex Alex-Ikanow

View GitHub Profile
@Alex-Ikanow
Alex-Ikanow / gist:1571455
Created January 6, 2012 17:06
Parsing script to convert internal NativeObjects and NativeArrays to JSON
function s1(el) {
if (el instanceof Array) {
s2(el, 1);
}
else if (typeof el == 'object') {
outList.add(s3(el));
}
else {
outList.add(el);
}
@Alex-Ikanow
Alex-Ikanow / gist:1453163
Created December 9, 2011 20:28
Various "nested" problems with elasticsearch 0.17.9 and 0.18.5 part 2
Steps 1-3 are the same as part 1 (https://gist.github.com/1453137)
1] Create an index called "nested_test" (eg I did this from elasticsearch-head) with 5 shards and 0 replicas
(or presumably something like
curl -XPUT 'http://localhost:9200/nested_test/' -d '
index :
number_of_shards : 5
number_of_replicas : 0
'
@Alex-Ikanow
Alex-Ikanow / gist:1453137
Created December 9, 2011 20:21
Various "nested" problems with elasticsearch 0.17.9 and 0.18.5 part 1
I managed to get the query to fail a few different ways, one of them appears to be linked to my "random" use of "nested" as the index type while trying to reproduce the "operational" error I occurred.
1] Create an index called "nested_test" (eg I did this from elasticsearch-head) with 5 shards and 0 replicas
(or presumably something like
curl -XPUT 'http://localhost:9200/nested_test/' -d '
index :
number_of_shards : 5
number_of_replicas : 0
@Alex-Ikanow
Alex-Ikanow / gist:1370278
Created November 16, 2011 15:07
Facets causing memory problems in 0.17.9
curl -XGET 'http://betadev:9200/document_index,doc_COMMUNITYID/document_index' -d '
{
"query":{
"bool":{
"must":[{
"bool":{
"must":{
"match_all":{}
}
}
@Alex-Ikanow
Alex-Ikanow / gist:1364037
Created November 14, 2011 14:21
Elastic search site plugin problems
#### 1] Install works fine....
[acp@localhost elasticsearch]$ sudo bin/plugin -install lukas-vlcek/bigdesk
-> Installing lukas-vlcek/bigdesk...
Trying https://github.com/downloads/lukas-vlcek/bigdesk/bigdesk-0.17.9.zip...
Trying https://github.com/lukas-vlcek/bigdesk/zipball/v0.17.9...
Trying https://github.com/lukas-vlcek/bigdesk/zipball/master...
Downloading ..................................DONE
Identified as a _site plugin, moving to _site structure ...
Installed bigdesk