Revisions
-
atinux revised this gist
Nov 21, 2013 . 4 changed files with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ username: Atinux # GO to Analysis tab :) 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 charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,2 @@ # GO to Analysis tab :) 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Auto generated by Found's Play-tool at 2013-11-21T16:39:56+01:00 version: 0 title: Examples of analyzer/tokenizer description: Multiples analyzer and one custom with tokenizer and filter to show the differences. 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ # GO to Analysis tab :) query: match_all: {} -
atinux revised this gist
Nov 21, 2013 . 6 changed files with 48 additions and 67 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,20 @@ text: Je suis une petite hirondelle qui adore sautiller dans l'herbe chanté bébé à l'@email ! analyzer: standard: type: standard simple: type: simple stop: type: stop snowball: type: snowball french: type: french special: type: custom tokenizer: standard filter: - lowercase - asciifolding - phonetic 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1 @@ username: Atinux 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,2 @@ # GO to Anaylysis tab :) 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 charactersOriginal file line number Diff line number Diff line change @@ -7,61 +7,51 @@ export ELASTICSEARCH_ENDPOINT="http://localhost:9200" curl -XPUT "$ELASTICSEARCH_ENDPOINT/play" -d '{ "settings": { "analysis": { "text": "Je suis une petite hirondelle qui adore sautiller dans l'herbe chanté bébé à l'@email !", "analyzer": { "standard": { "type": "standard" }, "simple": { "type": "simple" }, "stop": { "type": "stop" }, "snowball": { "type": "snowball" }, "french": { "type": "french" }, "special": { "type": "custom", "tokenizer": "standard", "filter": [ "lowercase", "asciifolding", "phonetic" ] } } } }, "mappings": {} }' # Index documents curl -XPOST "$ELASTICSEARCH_ENDPOINT/_bulk?refresh=true" -d ' {"index":{"_index":"play","_type":"type"}} {"username":"Atinux"} ' # Do searches curl -XPOST "$ELASTICSEARCH_ENDPOINT/_search?pretty" -d ' { "query": { "match_all": {} } } ' 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Auto generated by Found's Play-tool at 2013-11-21T16:39:17+01:00 version: 0 title: Examples of analyzer/tokenizer description: Multiples analyzer and one custom with tokenizer and filter to show the differences. 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,3 @@ # GO to Anaylysis tab :) query: match_all: {} -
alexbrasetvik revised this gist
Nov 14, 2013 . No changes.There are no files selected for viewing
-
alexbrasetvik revised this gist
Nov 14, 2013 . 3 changed files with 9 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,3 +4,8 @@ analyzer: standard_tokenize_only: type: custom tokenizer: standard # Switch to the "Analysis"-tab to see how the text gets tokenized by default. standard: type: standard 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 charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,9 @@ curl -XPUT "$ELASTICSEARCH_ENDPOINT/play" -d '{ "standard_tokenize_only": { "type": "custom", "tokenizer": "standard" }, "standard": { "type": "standard" } } } 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Auto generated by Found's Play-tool at 2013-11-14T11:31:15+01:00 version: 0 title: Simple case sensitive search description: "Standard tokenization, but without the lowercasing and stopword removal." -
alexbrasetvik created this gist
Nov 14, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ text: This text will be used if nothing else is specified. analyzer: standard_tokenize_only: type: custom tokenizer: standard 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ title: Foo Bar --- title: foo bar 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ type: properties: title: type: string analyzer: standard_tokenize_only 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,65 @@ #!/bin/bash export ELASTICSEARCH_ENDPOINT="http://localhost:9200" # Create indexes curl -XPUT "$ELASTICSEARCH_ENDPOINT/play" -d '{ "settings": { "analysis": { "text": "This text will be used if nothing else is specified.", "analyzer": { "standard_tokenize_only": { "type": "custom", "tokenizer": "standard" } } } }, "mappings": { "type": { "properties": { "title": { "type": "string", "analyzer": "standard_tokenize_only" } } } } }' # Index documents curl -XPOST "$ELASTICSEARCH_ENDPOINT/_bulk?refresh=true" -d ' {"index":{"_index":"play","_type":"type"}} {"title":"Foo Bar"} {"index":{"_index":"play","_type":"type"}} {"title":"foo bar"} ' # Do searches curl -XPOST "$ELASTICSEARCH_ENDPOINT/_search?pretty" -d ' { "query": { "match": { "title": { "query": "Foo" } } } } ' curl -XPOST "$ELASTICSEARCH_ENDPOINT/_search?pretty" -d ' { "query": { "match": { "title": { "query": "foo" } } } } ' 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # Auto generated by Found's Play-tool at 2013-11-14T11:29:41+01:00 version: 0 title: Simple case sensitive search description: "Standard tokenization, but without the lowercasing and stopword removal." 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ query: match: title: # This will only match the first document. query: Foo --- query: match: title: # This will match the second document only query: foo