This file contains hidden or 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://127.0.0.1:9200/testindex' | |
curl -XPUT 'http://127.0.0.1:9200/testindex' -d '{ | |
"mappings": { | |
"testtype": { | |
"_source": { | |
"enabled": true | |
}, | |
"_id": { | |
"index": "not_analyzed" |
This file contains hidden or 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
#!/bin/sh | |
curl -XDELETE 'http://localhost:9200/testindex' | |
echo "\nIndex deleted" | |
curl -XPOST 'http://localhost:9200/testindex' -d '{ | |
"settings": { | |
"analysis": { | |
"analyzer": { |
This file contains hidden or 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
#!/bin/sh | |
# Запрос только по тексту, находим 1 запись (Японская AND корпорация) | |
echo "query_string search:" | |
curl -XPOST 'http://localhost:9200/testindex/testtype/_search?pretty' -d '{ | |
"sort": [ | |
{ | |
"_id": { |
This file contains hidden or 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
#!/bin/sh | |
curl -XDELETE 'http://localhost:9200/testindex' | |
echo "\nIndex deleted" | |
curl -XPOST 'http://localhost:9200/testindex' -d '{ | |
"settings": { | |
"analysis": { | |
"analyzer": { |
This file contains hidden or 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
console.time('without toUpperCase'); | |
for(var i=0; i < 100000; i++){ | |
var str = "sOmeStR"; | |
if(str == "sOmeStR"){ | |
//console.log('=='); | |
} | |
} | |
console.timeEnd('without toUpperCase'); | |
console.time('with toUpperCase'); |
This file contains hidden or 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
wait = (functions, cb)-> | |
completed = [] | |
functions.forEach (func, index)-> | |
func ()-> | |
if completed.indexOf(index) is -1 | |
completed.push(index) | |
if completed.length is functions.length | |
cb() | |
wait [ |
This file contains hidden or 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
###* | |
* @param options.watch - set watches on files, see below | |
* @param options.cache - turn on caching for AST traversals, see below | |
* @param options.debug - turn on source mapping for debugging with //@ sourceURL=... in browsers that support it | |
* @param options.exports - an array of the core items to export to the namespace. Available items: 'require', 'process' | |
* @param options.require - Require a file or files for inclusion in the bundle. | |
* @param options.entry - Append a file to the end of the bundle and execute it without having to require() it. | |
* @param options.filter - Transform the source using the filter function fn(src). The return value of fn should be the new source. | |
* @param options.handlers - Register a handler to wrap extensions. | |
### |
NewerOlder