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

Phrase suggest options score value alway null. #2681

Closed
sebastien-comeau opened this issue Aug 30, 2023 · 0 comments · Fixed by #2680
Closed

Phrase suggest options score value alway null. #2681

sebastien-comeau opened this issue Aug 30, 2023 · 0 comments · Fixed by #2680
Labels
type: bug A general bug

Comments

@sebastien-comeau
Copy link
Contributor

Phrase suggest options from my Elasticsearch response contains option score values, The PhraseSuggestion.Entry.Option's score field value is alway null. Null is being assigned to score and collateMatch in SearchDocumentResponseBuilder.getPhraseSuggestion.

.add(new PhraseSuggestion.Entry.Option(optionES.text(), optionES.highlighted(), null, null)));

Elasticsearch response

{
  "took": 16,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 0,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  },
  "suggest": {
    "suggestionEn": [
      {
        "text": "National",
        "offset": 0,
        "length": 8,
        "options": [
          {
            "text": "nations",
            "score": 0.11480146
          },
          {
            "text": "national",
            "score": 0.08063514
          }
        ]
      }
    ],
    "suggestionFr": [
      {
        "text": "National",
        "offset": 0,
        "length": 8,
        "options": [
          {
            "text": "nations",
            "score": 0.0943285
          },
          {
            "text": "national",
            "score": 0.08952732
          }
        ]
      }
    ]
  }
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 30, 2023
sothawo pushed a commit that referenced this issue Sep 3, 2023
@sothawo sothawo added this to the 5.2 M3 (2023.1.0) milestone Sep 3, 2023
@sothawo sothawo added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 3, 2023
sothawo pushed a commit that referenced this issue Sep 3, 2023
…alues.

Original Pull Request #2680
Closes #2681

(cherry picked from commit 7c46639)
sothawo pushed a commit that referenced this issue Sep 3, 2023
…alues.

Original Pull Request #2680
Closes #2681

(cherry picked from commit 7c46639)
(cherry picked from commit 922f4b1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
3 participants