Skip to content

Instantly share code, notes, and snippets.

@jessejlt
Created August 19, 2011 21:47
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessejlt/1158093 to your computer and use it in GitHub Desktop.
Save jessejlt/1158093 to your computer and use it in GitHub Desktop.
EalsticSearch synonym configuration
# 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
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
}
curl -XPUT http://localhost:9200/test/records/1 -d '{
> "field type": "upper field first"
> }'
> {"ok":true,"_index":"test","_type":"records","_id":"1","_version":1}
# 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
@clintongormley
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment