Skip to content

Instantly share code, notes, and snippets.

Clinton Gormley clintongormley

Block or report user

Report or block clintongormley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
clintongormley / unique_words.js
Created Apr 3, 2017
Only return docs where all of the words in the docs are in the query
View unique_words.js
"settings": {
"analysis": {
"analyzer": {
"unique_terms": {
"tokenizer": "standard",
"filter": [
View Request.json
"mappings": {
"t": {
"properties": {
"bool": {
"type": "boolean"
View gist:831fc4f71910b4630073
elasticsearch-2.0.0-rc1> ./bin/plugin install -v delete-by-query
-> Installing delete-by-query...
Trying ...
Downloading ..DONE
Verifying checksums if available ...
Downloading .DONE
PluginInfo{name='delete-by-query', description='The Delete By Query plugin allows to delete documents in Elasticsearch with a single query.', site=false, jvm=true, classname=org.elasticsearch.plugin.deletebyquery.DeleteByQueryPlugin, isolated=true, version='2.0.0-rc1'}
Installed delete-by-query into /Users/clinton/workspace/servers/elasticsearch-2.0.0-rc1/plugins/delete-by-query
View gist:72fca0948755dac3ce5d
I ran the following on master:
PUT t/t/1
"foo": [[1]]
PUT t/t/1
clintongormley / gist:f52fa305870fb6a7a593
Created Aug 6, 2015
I ran the following on master:
View gist:f52fa305870fb6a7a593
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x0000000109334122, pid=7182, tid=28931
# JRE version: 7.0_21-b12
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x334122]
use Search::Elasticsearch;
my $e = Search::Elasticsearch->new( trace_to => 'Stderr' );
my %blogpost = (
title => "My first blogpost",
author => 'Clint',
content => 'blah blah blah'
clintongormley / demo.json
Created May 23, 2014
Only match if it matches all the tokens in a field
View demo.json
DELETE /_all
PUT /t
"mappings": {
"test": {
"properties": {
"text": {
View example.json
curl -XGET "http://localhost:9200/_search" -d'
"query": {
"bool": {
"should": [
"match": {
"parent.text": "query string"
View all_segs_few_docs.json
"status": "COMPLETE",
"errors": [],
"competitors": {
"bool": {
"summary": {
"nodes": [
"total_iterations": 5,
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
my @order;
my %char_filters;
use Regexp::Trie;
You can’t perform that action at this time.