Skip to content

Instantly share code, notes, and snippets.

curl -XDELETE "http://localhost:9200/t"
curl -XPUT "http://localhost:9200/t" -d'
{
"mappings": {
"P": {
"properties": {
"parstr": {
"type": "string"
}
curl -XGET "http://localhost:9200/parentchild/Child_english/_search" -d'
{
"query": {
"query_string": {
"query": "these are four words"
}
}
}'
@zwrss
zwrss / gist:8272310
Created January 5, 2014 18:55
MPI communication
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <iostream>
#include "mpi.h"
using namespace std;
@zwrss
zwrss / mapping.sh
Created March 18, 2013 15:31
Mappings for elasticsearch not nested stuff
#!/bin/sh
echo
curl -XDELETE 'http://localhost:9200/items'
echo
curl -XPUT 'localhost:9200/items' -d '
{
"mappings" : {
"Item" : {
"dynamic" : false,
@zwrss
zwrss / mappings_and_data
Created March 15, 2013 11:29
ElasticSearch tree structure search.
#!/bin/sh
echo
curl -XDELETE 'http://localhost:9200/products'
echo
curl -XPUT 'localhost:9200/products' -d '
{
"mappings" : {
"Root" : {