Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES 2.2 Highlight is not working anymore #16652

Closed
raffaeu opened this issue Feb 13, 2016 · 3 comments
Closed

ES 2.2 Highlight is not working anymore #16652

raffaeu opened this issue Feb 13, 2016 · 3 comments

Comments

@raffaeu
Copy link

raffaeu commented Feb 13, 2016

We worked on ES 1.4 for about 2 years, more or less. Deployed the product on the customer side and everyone was happy.

Now, we decided to upgrade to 2.2, recode all APIs changes and the highlight is not working anymore. It is not even returned.

Example of a query:

http://localhost:9200/index/Persons/_search

{
    "query": {
    "match": {
      "_all": "pippo"
    }
  },
    "highlight" : {
        "fields" : {
            "*" : {}
        }
    }
}

Results are returned but the Highlight node is gone, I tried all possible options and it seems that ES 2.2 doesn't return highlights at all but I look at the backlog and you didn't mention drastic changes under the highlight feature.

{
  "took": 6,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 2,
    "max_score": 0.83263576,
    "hits": [
      {
        "_index": "myindex",
        "_type": "Persons",
        "_id": "8701653d-261c-4c67-b59c-9b7aac2df3b6",
        "_score": 0.83263576,
        "_source": {
          "Full_name": "Disney, Pippo",
          "Email": "pippomproof@gmail.com"
        }
      }
    ]
  }
}

Am I doing something wrong or simply ES 2.2 removed highlights?

@raffaeu
Copy link
Author

raffaeu commented Feb 13, 2016

And of course highlight is mentioned in my mapping

{
  "myindex": {
    "mappings": {
      "Persons": {
        "properties": {
          "Email": {
            "type": "string"
          },
          "Full_name": {
            "type": "string"
          },
          "highlight": {
            "properties": {
              "fields": {
                "properties": {
                  "content": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

@raffaeu
Copy link
Author

raffaeu commented Feb 13, 2016

Thank you for pointing it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants