Giter Club home page Giter Club logo

Comments (5)

sschuerz avatar sschuerz commented on September 13, 2024

Has nobody else experienced this issue? I would really need a solution for this, especially since I'm facing problems with the built-in highlighters in elasticsearch. See here: elastic/elasticsearch#8468

Here a full minimal example to reproduce the bug:

PUT test_index

POST test_index/test_type/
{
  "foo": "foo_value_1",
  "bar": "bar_value_1"
}

GET test_index/test_type/_search
{
  "query": {
    "match": {
      "_all": {
        "query": "foo_value_1"
      }
    }
  },
  "highlight": {
    "fields": {
      "*": {
        "type": "experimental"
      }
    }
  }
}

Here the full elasticsearch response:

{
   "took": 8,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 4,
      "failed": 1,
      "failures": [
         {
            "index": "test_index",
            "shard": 4,
            "status": 500,
            "reason": "FetchPhaseExecutionException[[test_index][4]: query[filtered(_all:foo_value_1)->cache(_type:test_type)],from[0],size[10]: Fetch Failed [Failed to highlight field [_size]]]; nested: NumberFormatException[For input string: \"\"]; "
         }
      ]
   },
   "hits": {
      "total": 1,
      "max_score": 0.19178301,
      "hits": []
   }
}

Could anyone please look into this?
Or does anyone know a workaround (without specifying all fields explicitly)?

search-highlighter version: 1.4.0
elasticsearch version: 1.4.2

from search-highlighter.

nik9000 avatar nik9000 commented on September 13, 2024

Hey sorry for not responding to this. It looks like I wasn't subscribed to my own project..... I've recreated the problem like this:

curl -XPUT localhost:9200/test_index

curl -XPOST localhost:9200/test_index/test_type?pretty -d'
{
  "foo": "foo_value_1",
  "bar": "bar_value_1"
}'

curl -XPOST localhost:9200/test_index/test_type/_search?pretty -d'
{
  "query": {
    "match": {
      "_all": {
        "query": "foo_value_1"
      }
    }
  },
  "highlight": {
    "fields": {
      "*": {
        "type": "experimental"
      }
    }
  }
}'

I'll see if I can fix it. I don't have a ton of time but I might be able to do it.

from search-highlighter.

nik9000 avatar nik9000 commented on September 13, 2024

@sschuerz - sorry for the super late response. I've got the fix posted for code review at the foundation and we should get it merged within a day or so. Its reasonably simple for me to cut another release of the plugin once that is done.

from search-highlighter.

sschuerz avatar sschuerz commented on September 13, 2024

Thank you very much!

In the meantime I switched to the built-in fast vector highlighter, accepting some issues with it (indexing with positions and offset; explicitly specifying all the fields in the mapping to index them with positions and offsets).

But if there is a new release of the experimental highlighter, I'll try using it again.

from search-highlighter.

nik9000 avatar nik9000 commented on September 13, 2024

I've just about finished the release. It should be synced to central in an hour or so.

from search-highlighter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.