Created
February 14, 2012 15:30
-
-
Save anonymous/1827576 to your computer and use it in GitHub Desktop.
Showing the pipedelim analyzer issue
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
elasticsearch.json | |
{ | |
"cluster.name": "<voided>", | |
"cloud.aws.access_key": "<voided>", | |
"cloud.aws.secret_key": "<voided>", | |
"discovery":{ | |
"type": "ec2" | |
}, | |
"discovery.ec2.groups": "<voided>", | |
"index":{ | |
"analysis":{ | |
"analyzer":{ | |
"pipeDelim":{ | |
"type": "pattern", | |
"stopwords": "_none_", | |
"flags": "DOTALL", | |
"lowercase":true, | |
"pattern": "\\|" | |
}, | |
"pipeDelimTest":{ | |
"type":"custom", | |
"tokenizer":"pattern", | |
"pattern":"\\|", | |
"filter":["lowercase"] | |
}, | |
"simpleText":{ | |
"tokenizer": "whitespace", | |
"filter": ["lowercase"] | |
}, | |
"mainText":{ | |
"tokenizer": "standard", | |
"filter": ["standard", "lowercase"] | |
}, | |
"urlDelim":{ | |
"type": "pattern", | |
"stopwords": "_none_", | |
"pattern": "\/|-|[0-9]|:|\\.|_", | |
"lowercase": true, | |
"flags": "DOTALL" | |
} | |
} | |
}, | |
"query":{ | |
"bool":{ | |
"max_clause_count": 100240 | |
} | |
} | |
}, | |
"path.data": "/mnt/elasticsearch/data", | |
"path.work": "/mnt/elasticsearch/work", | |
"path.logs": "/mnt/elasticsearch/logs", | |
"bootstrap.mlockall": true | |
} | |
index:test-analyzer | |
{ | |
state: open | |
settings: { | |
index.number_of_replicas: 1 | |
index.number_of_shards: 1 | |
} | |
mappings: { | |
document: { | |
properties: { | |
title: { | |
type: string | |
} | |
} | |
} | |
test-document: { | |
properties: { | |
title: { | |
store: yes | |
analyzer: pipeDelim | |
type: string | |
} | |
} | |
} | |
} | |
aliases: [ ] | |
} | |
doc stored | |
{ | |
title:"Kobe Bryant|Lamar Odom" | |
} | |
search: | |
{ | |
query: { | |
bool: { | |
must: [ | |
{ | |
term: { | |
title: "Kobe Bryant" | |
} | |
} | |
] | |
must_not: [ ] | |
should: [ ] | |
} | |
} | |
from: 0 | |
size: 50 | |
sort: [ ] | |
facets: { } | |
} | |
No Results | |
search: | |
{ | |
query: { | |
bool: { | |
must: [ | |
{ | |
term: { | |
title: "bryant" | |
} | |
} | |
] | |
must_not: [ ] | |
should: [ ] | |
} | |
} | |
from: 0 | |
size: 50 | |
sort: [ ] | |
facets: { } | |
} | |
1 document hit (the one that was inserted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment