This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subject: [PATCH] Time series agg improvement | |
Only generate tsid once per tsid hash and segment. | |
--- | |
Index: server/src/test/java/org/elasticsearch/index/mapper/ObjectMapperTests.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/server/src/test/java/org/elasticsearch/index/mapper/ObjectMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/ObjectMapperTests.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.lucene.document.Document; | |
import org.apache.lucene.index.DirectoryReader; | |
import org.apache.lucene.index.IndexReader; | |
import org.apache.lucene.index.IndexableField; | |
import org.apache.lucene.index.MultiFields; | |
import org.apache.lucene.store.Directory; | |
import org.apache.lucene.store.FSDirectory; | |
import org.apache.lucene.util.Bits; | |
import java.nio.file.Paths; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shapefile | |
import os | |
import csv | |
import json | |
from datetime import datetime | |
weatherDataFile = '2016-sorted.csv' | |
def processWeatherDoc(currentStationDoc): | |
if 'TMAX' in currentStationDoc: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Abcd { | |
public static void main(String[] args) throws Exception { | |
Settings settings = Settings.builder() | |
.put("http.enabled", "false") | |
.put("transport.type", "local") | |
.put("discovery.type", "local") | |
.put("path.home", "/home/mvg/temp") | |
.put("cluster.name", "bwc_index_5.0.0") | |
.put("repositories.url.allowed_urls", "http://snapshot.test*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.elasticsearch.rest.action.get; | |
import org.elasticsearch.action.get.GetRequest; | |
import org.elasticsearch.action.get.GetResponse; | |
import org.elasticsearch.client.Client; | |
import org.elasticsearch.common.Strings; | |
import org.elasticsearch.common.bytes.BytesArray; | |
import org.elasticsearch.common.inject.Inject; | |
import org.elasticsearch.common.settings.Settings; | |
import org.elasticsearch.rest.BaseRestHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "http://localhost:9200/_all" | |
curl -XPUT "http://localhost:9200/test1" -d' | |
{ | |
"mappings": { | |
"parent" : { | |
"properties": { | |
"weight" : { | |
"type": "double" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT "http://localhost:9200/index2" -d' | |
{ | |
"mappings": { | |
"child" : { | |
"_parent": { | |
"type": "child" | |
} | |
} | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -XPUT localhost:9200/_template/template_tags -d '{ | |
"template" : "tags*", | |
"settings" : { | |
"index.analysis.analyzer.csv.type" : "pattern", | |
"index.analysis.analyzer.csv.pattern" : "," | |
}, | |
"mappings" : { | |
"_default_" : { | |
"properties" : { | |
"tags" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"match": { | |
"name": "some name" | |
} | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -XDELETE 'http://localhost:9200/test-idx' | |
echo | |
curl -s -XPUT 'http://localhost:9200/test-idx' -d '{ | |
"settings": { | |
"index.number_of_shards" : 1 | |
}, | |
"mappings" : { | |
"document" : { | |
"properties" : { | |
"tags" : { |
NewerOlder