elasticsearch
query_error
ai_generated
true
ElasticsearchException: script_score function produced NaN
ID: elasticsearch/script-score-error
82%Fix Rate
86%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 8 | active | — | — | — |
Root Cause
Script score function produced NaN or negative score.
genericWorkarounds
-
90% success Add null/zero checks in score script: Math.max(0, value)
-
88% success Use saturation or sigmoid decay functions for bounded scores
Dead Ends
Common approaches that don't work:
-
Return 0 for all NaN cases
72% fail
Incorrect ranking results
-
Remove function_score
75% fail
Loses custom relevance tuning