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
total disk: 379,720,980 | |
num docs: 1,000,000 | |
stored fields: 167,903,971 | |
term vectors: 0 | |
norms: 0 | |
docvalues: 82,117,451 | |
postings: 98,314,810 | |
prox: 0 | |
points: 23,599,626 | |
terms: 7,761,248 |
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
total disk: 30,412,907,228 | |
num docs: 165,346,692 | |
stored fields: 11,049,749,404 | |
term vectors: 0 | |
norms: 0 | |
docvalues: 8,722,043,518 | |
postings: 918,100,584 | |
prox: 0 | |
points: 8,320,476,220 | |
terms: 1,402,532,940 |
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
pouet |
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
"dynamic_templates": [ | |
{ | |
"template1": { | |
"mapping": { | |
"store": true, | |
"type": "{dynamic_type}" | |
}, | |
"match": "*" | |
} | |
} |
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 requests, json | |
url = "http://127.0.0.1:9206/test/_search?pretty&size=0" | |
#body = '{"query":{"match":{"field1":"value1"}}}' | |
body = '{"query":{"match_all":{}}}' | |
N=100 | |
sumTook = 0 | |
for i in range(0,N): | |
r = requests.get(url, data = body) | |
sumTook+=int(r.json.get('took')) |
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
width = 4 | |
top_count = 256 | |
total = 0 | |
freqs = {} | |
for line in open("/usr/share/dict/words").readlines(): | |
line = line.rstrip('\n') | |
if line.find('\'') >= 0: | |
continue | |
total += len(line) |
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
DELETE test | |
PUT test | |
{ | |
"mappings": { | |
"test": { | |
"properties": { | |
"start": { | |
"type": "date" | |
}, |
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
/* | |
* Licensed to Elasticsearch under one or more contributor | |
* license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright | |
* ownership. Elasticsearch licenses this file to you under | |
* the Apache License, Version 2.0 (the "License"); you may | |
* not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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 java.io.IOException; | |
import java.util.Arrays; | |
import org.apache.lucene.search.DocIdSet; | |
import org.apache.lucene.search.DocIdSetIterator; | |
import org.apache.lucene.util.ArrayUtil; | |
import org.apache.lucene.util.RamUsageEstimator; | |
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
DELETE test | |
PUT test/test/1 | |
{ | |
"values": ["a", "c"] | |
} | |
POST test/test/1/_update | |
{ | |
"script": "def values = ctx._source.values as Set; ctx._source.values = values + new_values", |
NewerOlder