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
.DS_Store |
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
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = "carrierwave-blob" | |
s.version = "0.0.1" | |
s.platform = Gem::Platform::RUBY | |
s.summary = "BLOB support for Carrierwave" | |
s.authors = [ 'Karel Minarik', 'Vojtech Hyza' ] | |
s.email = [ '[email protected]', '[email protected]' ] |
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
echo "[!] delete twitter index" | |
curl -XDELETE 'http://localhost:9200/twitter/' ; echo | |
echo "[*] create twitter index" | |
curl -XPUT 'http://localhost:9200/twitter/' -d '{ | |
"mappings": { | |
"tweet": { | |
"properties": { | |
"text": { | |
"type": "string", |
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
.DS_Store | |
Gemfile.lock | |
*.pem | |
node.json | |
tmp/* | |
!tmp/.gitignore |
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
require 'rubygems' | |
require 'tire' | |
class Article | |
include Tire::Model::Persistence | |
# Jen zmena nazvu indexu at nahodou nesmazes nejaky svuj existujici 'articles' index | |
# |
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
require 'tire' | |
Tire.index 'users_tire_issue' do | |
delete | |
create mappings: { | |
user: { | |
properties: { | |
email: { type: 'string' }, | |
names: { type: 'string', analyzer: 'snowball' }, | |
medical_conditions: { |
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
require 'tire' | |
Tire.configure do | |
logger STDERR | |
end | |
Tire.index 'filtered_test' do | |
delete | |
create | |
store tags: ['ruby'], content: 'is awesome' |
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
# encoding: utf-8 | |
STDOUT.sync = true | |
STDERR.sync = true | |
require 'pathname' | |
at_exit do | |
if (e = $!) && !e.instance_of?(SystemExit) | |
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape" |
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
# Remove index | |
curl -s -XDELETE "http://localhost:9200/fields_test" | |
# Set new index with mapping | |
curl -s -XPUT "http://localhost:9200/fields_test" -d ' | |
{ | |
"mappings": { | |
"tweet" : { | |
"properties" : { |
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
# ======================================== | |
# Testing multiple analyzers per field | |
# ======================================== | |
# Setup | |
curl -s -X DELETE 'http://localhost:9200/news_test/' | |
# Create index with settings and mapping | |
curl -s -X PUT 'http://localhost:9200/news_test' -d ' | |
{ |
NewerOlder