Created
August 19, 2011 21:47
-
-
Save jessejlt/1158093 to your computer and use it in GitHub Desktop.
EalsticSearch synonym configuration
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
# The cluster name | |
cluster.name: media | |
# Path Settings | |
#path.conf: /path/to/conf | |
#path.data: /path/to/data | |
#path.work: /path/to/work | |
#path.logs: /path/to/logs | |
# Gateway Settings | |
# Controls when to start the initial recovery process when starting a new cluster | |
#gateway.recover_after_nodes: 1 | |
#gateway.recover_after_time: 5m | |
#gateway.expected_nodes: 2 | |
# Force all memory to be locked, forcing JVM to never swap | |
# (make sure to set MIN and MAX mem to the same value) | |
# In order to see if this works or not, set the `common.jna` logging to DEBUG level. | |
# A solution to “Unknown mlockall error 0” can be to set ulimit -l unlimited. | |
#bootstrap.mlockall: true | |
# Controls the minimum number of master eligible nodes this node should "see" | |
# in order to operate within the cluster. | |
# Set this to a higher value (2-4) when running more than 2 nodes in the cluster | |
#discovery.zen.minimum_master_nodes: 1 | |
# The time to wait for ping responses from other nodes when doing node discovery | |
#discovery.zen.ping.timeout: 3s | |
# Unicast Discovery (disable multicast) | |
#discovery.zen.ping.multicast.enabled: false | |
#discovery.zen.ping.unicast.hosts: ["host1", "host2"] | |
cluster: | |
name: media-manager | |
path: | |
logs: /usr/local/var/log | |
data: /usr/local/var/data | |
# index config | |
index : | |
analysis : | |
analyzer : | |
standard : | |
type : standard | |
tokenizer : | |
myTokenizer1 : | |
type : standard | |
filter : | |
myTokenFilter1 : | |
type : synonym | |
synonyms_path : synonym.txt |
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 -XGET http://localhost:9200/test/records/_search?q=uff | python -m json.tool | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 122 100 122 0 0 16776 0 --:--:-- --:--:-- --:--:-- 40666 | |
{ | |
"_shards": { | |
"failed": 0, | |
"successful": 5, | |
"total": 5 | |
}, | |
"hits": { | |
"hits": [], | |
"max_score": null, | |
"total": 0 | |
}, | |
"timed_out": false, | |
"took": 2 | |
} |
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 -XPUT http://localhost:9200/test/records/1 -d '{ | |
> "field type": "upper field first" | |
> }' | |
> {"ok":true,"_index":"test","_type":"records","_id":"1","_version":1} |
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
# http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html | |
# video synonyms | |
scan-type, scan type, scantype, field-type, field type, fieldtype, field-order, field order fieldorder, interlacement, field-dominance, field dominance | |
frame-rate, framerate, frame rate | |
bit-depth, bit depth, bitdepth | |
par, pixel-aspect-ratio, pixel aspect ratio, aspect ratio | |
upper field first, uff, tff | |
lower field first, lff, bff | |
time code, timecode | |
# audio synonyms | |
sample-rate, sample rate, samplerate | |
stereo, two-channel, two channel, 2-channel, 2 channel, 2 | |
mono, one-channel, one channel, 1-channel, 1 channel, 1 | |
5.1, surround, surround sound, 6-channel, 6 channel, six-channel, six channel | |
nchannel, n-channel, multichannel, surround, panning, channelized, multi mono |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See my demo at https://gist.github.com/4193a7d63af534d3b0ef