Skip to content

Instantly share code, notes, and snippets.

View dakrone's full-sized avatar

Lee Hinman dakrone

View GitHub Profile
#!/usr/bin/env zsh
curl -XDELETE localhost:9200/ss-test
curl -XPOST 'localhost:9200/ss-test' -d'
{
"mappings": {
"doc": {
"_source": {
"enabled": true
#!/usr/bin/env zsh
curl -s -XDELETE localhost:9200/missing-test
curl -s -XPOST localhost:9200/missing-test -d'
{
"mappings": {
"doc": {
"_source": {
"enabled": true
},
@dakrone
dakrone / broken-get.zsh
Created May 6, 2013 21:21
broken get for date arrays
#!/usr/bin/env zsh
curl -XDELETE localhost:9200/get-test
curl -XPOST 'localhost:9200/get-test' -d'
{
"mappings": {
"doc": {
"_source": {
"enabled": true
@dakrone
dakrone / broken-get2.zsh
Created May 6, 2013 21:21
broken get for integer arrays
#!/usr/bin/env zsh
curl -XDELETE localhost:9200/get-test
curl -XPOST 'localhost:9200/get-test' -d'
{
"mappings": {
"doc": {
"_source": {
"enabled": true
#!/bin/zsh
# elasticsearch 0.20.1 vanilla
curl -s -XPUT "http://localhost:9200/testidx" -d '{"index":{"number_of_shards":1,"number_of_replicas":0}}'
echo
curl -s -XPUT "http://localhost:9200/testidx/msg/1?refresh=true" -d '{"id":"1","message":"test"}'
echo
-- Skype Mute, Version 1.1
-- Copyright (c) 2008 Chuck Burt. All rights reserved.
-- http://www.chuckburt.com/
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
@dakrone
dakrone / example.json
Created October 12, 2012 18:11
Example output from cadastre - http://github.com/dakrone/cadastre
{
"description": "JSON and JSON SMILE encoding, fast.",
"group": "cheshire",
"name": "cheshire",
"namespaces": {
"cheshire.core": [
{
"arglists": [
[
"reader",
@dakrone
dakrone / project.clj
Created February 16, 2012 18:01
lein-multi functionality with lein ver.2 profiles
∴ lein2 all test
Performing task 'test' with profile(s): 'dev,1.2'
Testing clj-http.test.client
Testing clj-http.test.cookies
Testing clj-http.test.core
Ran 47 tests containing 175 assertions.
‹ ~/src/clj/cheshire master⚡ › ∴ echo $JAVA_OPTS
-Dfile.encoding=UTF-8 -Dslime.encoding=UTF-8 -Xmx512m -XX:+HeapDumpOnOutOfMemoryError
‹ ~/src/clj/cheshire master⚡ › ∴ lein repl
Error occurred during initialization of VM
java.nio.charset.IllegalCharsetNameException: UTF-8 -Dslime.encoding=UTF-8 -Xmx512m -XX:+HeapDumpOnOutOfMemoryError
at java.nio.charset.Charset.checkName(Charset.java:284)
at java.nio.charset.Charset.lookup2(Charset.java:458)
at java.nio.charset.Charset.lookup(Charset.java:437)
at java.nio.charset.Charset.defaultCharset(Charset.java:579)
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:37)
[2011-10-25 16:55:48,055][DEBUG][action.search.type ] [Animus] [test-account-id-0][0], node[mN5HrUzxRYSOwzYjmxEUhQ], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@19b12fb]
org.elasticsearch.ElasticSearchParseException: failed to parse / load source
at org.elasticsearch.search.lookup.SourceLookup.loadSourceIfNeeded(SourceLookup.java:69)
at org.elasticsearch.search.lookup.SourceLookup.extractValue(SourceLookup.java:131)
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:186)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:308)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsy