Skip to content

"offsets must not go backwards" exception when using index_options=offsets #4406

@lmenezes

Description

@lmenezes

to reproduce(on 0.90.8 snapshot):

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"}'

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions