Skip to content

Instantly share code, notes, and snippets.

package org.mapdb;
import static org.junit.Assert.assertEquals;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.Serializable;
import java.nio.file.Files;
import java.nio.file.Path;
package com.demandware.elasticsearch.regression;
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import static org.junit.Assert.assertEquals;
import java.nio.charset.Charset;
import org.elasticsearch.action.search.SearchResponse;
@jfiedler
jfiedler / gist:986550
Created May 23, 2011 11:04
Strange secondary sorting of Elastic Search TermsFacet entries with identical hit count
curl -XDELETE 'http://localhost:9200/test/'
curl -XPUT 'http://localhost:9200/test/'
curl -XPUT 'http://localhost:9200/test/test/1' -d '
{
"doc":{
"string" : "foo"
}
}
'
@jfiedler
jfiedler / gist:952984
Created May 3, 2011 08:10
Curl reproduction of wrong sort order for reverse 'missing last' on double values
curl -XPUT 'http://localhost:9200/test/'
# index document without double value
curl -XPUT 'http://localhost:9200/test/test/1' -d '
{
"doc":{
}
}
'
@jfiedler
jfiedler / ES16ReproductionTest.java
Created April 29, 2011 07:23
Curl / Java API Recreation of Elastic Search 0.16.0 Problem
package itembedded.search.search;
import static org.elasticsearch.index.query.xcontent.QueryBuilders.termQuery;
import junit.framework.Assert;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.search.SearchHits;
@jfiedler
jfiedler / gist:861923
Created March 9, 2011 09:17
Curl based recreation of a strange Elastic Search warning when putting a perfectly valid mapping
$ curl -XPUT 'http://localhost:9200/twitter/'
$ curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"dynamic_templates" : [ {
"template1" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {