Skip to content

Instantly share code, notes, and snippets.

@qpfiffer
Created April 16, 2013 21:57
Show Gist options
  • Save qpfiffer/5399991 to your computer and use it in GitHub Desktop.
Save qpfiffer/5399991 to your computer and use it in GitHub Desktop.
Output of token analysis
λ:~/src/beehive/apps/products curl -XGET 'localhost:9200/products/_analyze?field=name&pretty=1' -d "\@\@Bruschetta, Ultra Thin Pizza"
{
"tokens" : [ {
"token" : "\\@\\@bruschetta,",
"start_offset" : 0,
"end_offset" : 15,
"type" : "word",
"position" : 1
}, {
"token" : "@",
"start_offset" : 1,
"end_offset" : 2,
"type" : "word",
"position" : 1
}, {
"token" : "@",
"start_offset" : 3,
"end_offset" : 4,
"type" : "word",
"position" : 2
}, {
"token" : "@@",
"start_offset" : 1,
"end_offset" : 4,
"type" : "word",
"position" : 2
}, {
"token" : "bruschetta",
"start_offset" : 4,
"end_offset" : 14,
"type" : "word",
"position" : 3
}, {
"token" : "ultra",
"start_offset" : 16,
"end_offset" : 21,
"type" : "word",
"position" : 4
}, {
"token" : "thin",
"start_offset" : 22,
"end_offset" : 26,
"type" : "word",
"position" : 5
}, {
"token" : "pizza",
"start_offset" : 27,
"end_offset" : 32,
"type" : "word",
"position" : 6
} ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment