[COMPASS-5592] Parsing "undefined" field name breaks Export Pipeline to Language feature Created: 16/Mar/22  Updated: 08/Feb/23

Status: Open
Project: Compass
Component/s: Export to Language
Affects Version/s: 1.30.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Leonardo Rossi (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by COMPASS-6052 Export to code doesn't understand "un... Open
Story Points: 5

 Description   

Problem Statement/Rationale

What is going wrong? What action would you like the Engineering team to take?

Steps to Reproduce

Add a $search stage in your aggregation, with code similar to this

{
  index: 'mflix-movies-fts', 
  text: {
    query: 'henry', 
    path: 'cast', 
    score: {
      'function': {
        gauss: {
          path: {
            value: 'rating', 
            undefined: 50,
          },
          origin: 95,
          scale: 5,
          offset: 5,
          decay: 0.5
        }
      }
    }
  }
}

 

Expected Results

User can export to language

Actual Results

An error message appears

no viable alternative at input '[{$search: {\n index: 'mflix-movies-fts',\n text: {\n query: 'henry',\n path: 'cast',\n score: {\n 'function': {\n gauss: {\n path: {\n value: 'rating',\n undefined'

Additional Notes

Tried with quotes like 'undefined' of "undefined" with same result


Generated at Wed Feb 07 22:40:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.