curl -XPOST http://localhost:9200/foobar -d '{ "index": { "number_of_shards": "1", "analysis": { "filter": { "wordDelimiter": { "type": "word_delimiter", "split_on_numerics": "false", "generate_word_parts": "true", "generate_number_parts": "true", "catenate_words": "true", "catenate_numbers": "true", "catenate_all": "false" } }, "analyzer": { "content_analyzer": { "tokenizer": "whitespace", "filter": [ "wordDelimiter" ] } } } } }'
curl -XPOST http://localhost:9200/foobar/foobar/_mapping -d '{ "foobar": { "dynamic": "false", "_all" : { "enabled" : false }, "properties": { "id": { "type": "integer", "index": "not_analyzed", "store": "yes" }, "content": { "type": "string", "analyzer": "content_analyzer", "store": "yes", "term_vector" : "with_positions_offsets", "omit_norms": true, "index_options":"offsets" } } } }'
curl -XPUT http://localhost:9200/foobar/foobar/1 -d '{"id": 1, "content":"a,a b a/b/c"}'
I guess it's a bug on Lucene.
to reproduce(on 0.90.8 snapshot):
yields:
{"error":"IllegalArgumentException[offsets must not go backwards startOffset=0 is < lastStartOffset=2 for field 'content']","status":500}~
I guess it's a bug on Lucene.