experimental plugin throws exception on some requests
Open, NormalPublic

Description

Doesn't seem to happen all that much, but still probably worth looking into at some point.

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2017.10.17/elasticsearch/?id=AV8qg6Z0TqnoMLVnwvus

{
  "_index": "logstash-2017.10.17",
  "_type": "elasticsearch",
  "_id": "AV8qg6Z0TqnoMLVnwvus",
  "_score": null,
  "_source": {
    "LoggerName": "org.wikimedia.highlighter.experimental.elasticsearch.ExperimentalHighlighter",
    "source_host": "10.64.0.235",
    "level": "ERROR",
    "Severity": "ERROR",
    "Time": "2017-10-17 13:26:31,0316",
    "type": "elasticsearch",
    "message": "Failed to highlight field [java.lang.StringIndexOutOfBoundsException: String index out of range: -5]",
    "normalized_message": "Failed to highlight field [java.lang.StringIndexOutOfBoundsException: String index out of range: -5]",
    "SourceMethodName": "highlight",
    "Thread": "elasticsearch[elastic1034][search][T#28]",
    "tags": [
      "es",
      "gelf",
      "normalized_message_untrimmed"
    ],
    "@timestamp": "2017-10-17T13:26:31.319Z",
    "SourceSimpleClassName": "ExperimentalHighlighter",
    "host": "elastic1034",
    "@version": "1",
    "SourceClassName": "org.wikimedia.highlighter.experimental.elasticsearch.ExperimentalHighlighter",
    "gelf_level": "3",
    "SourceLineNumber": 75,
    "timestamp": "1508246791.316"
  },
  "fields": {
    "@timestamp": [
      1508246791319
    ]
  },
  "sort": [
    1508246791319
  ]
}
Restricted Application added a project: Discovery. · View Herald TranscriptOct 17 2017, 7:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
debt added a subscriber: debt.Oct 17 2017, 11:59 PM

Does this block anything or is it just annoying?

Aklapper renamed this task from experiemental plugin throws exception on some requests to experimental plugin throws exception on some requests.Oct 18 2017, 9:37 AM

@debt this is definitely a bug that needs to be fixed, it's probably not a high priority.

debt triaged this task as Normal priority.Oct 18 2017, 4:09 PM
debt moved this task from Needs triage to Up Next on the Discovery-Search board.

Thanks, @dcausse, I've moved it to up next.

Change 445181 had a related patch set uploaded (by DCausse; owner: DCausse):
[search/highlighter@master] Add elastic 6.3.0 support

https://gerrit.wikimedia.org/r/445181

dcausse claimed this task.
dcausse moved this task from Backlog to Needs review on the Discovery-Search (Current work) board.

Without the full stacktrace I'm not entirely sure that the attached patch will fix the issue but I've seen similar behavior while upgrading to 6.3.
I suggest to wait and see if the error disappears after we migrate to 6.3.

Change 445181 merged by jenkins-bot:
[search/highlighter@master] Add elastic 6.3.0 support

https://gerrit.wikimedia.org/r/445181