Skip to content

Conversation

@deshsidd
Copy link
Contributor

@deshsidd deshsidd commented Jun 6, 2025

Add Semantic Version field type mapper and extensive unit tests

This PR introduces a new version field type that follows Semantic Versioning (SemVer) semantics. It allows indexing and querying of version strings such as 1.0.0, 1.0.0-alpha, 2.1.0+build.1, etc., with correct ordering and range support.

Description

Summary:

  • Implements a SemanticVersionFieldMapper that extends TermBasedFieldType.
  • Internally normalizes semantic version strings into sortable format.
  • Supports common query types like exists, match, multi-match, term, terms, range, prefix, wildcard, regex, fuzzy, ids query, constant score, function score, match phrase, sort, etc.
  • Build metadata (e.g., +build123) is ignored for ordering per SemVer spec.
  • Pre-releases (e.g., -alpha, -rc.1) are handled correctly during comparisons.

Code Additions:

  • SemanticVersion.java: Semantic version model and comparator logic
  • SemanticVersionFieldMapper.java: Mapper definition and version field parser
  • Registered in IndicesModule.java

Tests:
Includes full unit test coverage.

  • Parsing and normalization: SemanticVersionTests.java
  • Mapper behavior and indexing: SemanticVersionFieldMapperTests.java
  • Query support across various query types: SemanticVersionFieldQueryTests.java

Related Issues

Addresses #16814

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

Examples

1. Create index with mapping

Request:

PUT test_versions
{
  "mappings": {
    "properties": {
      "app": {
        "type": "keyword"
      },
      "version": {
        "type": "version"
      },
      "release_date": {
        "type": "date"
      },
      "description": {
        "type": "text"
      }
    }
  }
}

Response:

{
  "acknowledged": true,
  "shards_acknowledged": true,
  "index": "test_versions"
}

2. Index data

Request:

POST test_versions/_bulk
{ "index": {} }
{ "app": "AlphaApp", "version": "1.0.0", "release_date": "2023-01-01", "description": "Initial release" }
{ "index": {} }
{ "app": "AlphaApp", "version": "1.0.1", "release_date": "2023-02-15", "description": "Bug fix release" }
{ "index": {} }
{ "app": "AlphaApp", "version": "1.1.0", "release_date": "2023-05-10", "description": "Minor feature update" }
{ "index": {} }
{ "app": "AlphaApp", "version": "2.0.0", "release_date": "2024-01-01", "description": "Major release" }
{ "index": {} }
{ "app": "BetaApp",  "version": "0.9.0", "release_date": "2022-12-01", "description": "Beta release" }
{ "index": {} }
{ "app": "BetaApp",  "version": "1.0.0-alpha", "release_date": "2023-03-01", "description": "Alpha pre-release" }
{ "index": {} }
{ "app": "BetaApp",  "version": "1.0.0-alpha.1", "release_date": "2023-03-10", "description": "Alpha patch" }
{ "index": {} }
{ "app": "BetaApp",  "version": "1.0.0-beta", "release_date": "2023-04-01", "description": "Beta pre-release" }
{ "index": {} }
{ "app": "BetaApp",  "version": "1.0.0-rc.1", "release_date": "2023-04-15", "description": "Release candidate" }
{ "index": {} }
{ "app": "BetaApp",  "version": "1.0.0+20230815", "release_date": "2023-08-15", "description": "Build metadata release" }
{ "index": {} }
{ "app": "GammaApp", "version": "1.2.0", "release_date": "2023-09-01", "description": "Stable release" }
{ "index": {} }
{ "app": "GammaApp", "version": "1.2.0-alpha", "release_date": "2023-07-15", "description": "Alpha version of 1.2" }
{ "index": {} }
{ "app": "GammaApp", "version": "1.2.0-beta.2", "release_date": "2023-08-01", "description": "Beta 2 version of 1.2" }
{ "index": {} }
{ "app": "GammaApp", "version": "1.2.0-rc.1", "release_date": "2023-08-15", "description": "RC version of 1.2" }

Response:

{
  "took": 23,
  "errors": false,
  "items": [
    {
      "index": {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 0,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "cSWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 1,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "ciWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 2,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "cyWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 3,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "dCWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 4,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "dSWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 5,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "diWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 6,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "dyWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 7,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "eCWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 8,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "eSWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 9,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "eiWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 10,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 11,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "fCWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 12,
        "_primary_term": 1,
        "status": 201
      }
    },
    {
      "index": {
        "_index": "test_versions",
        "_id": "fSWNQpcBY7cEASBv3Vr1",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 13,
        "_primary_term": 1,
        "status": 201
      }
    }
  ]
}

3a. match_all query

Request:

GET test_versions/_search
{
  "query": { "match_all": {} }
}

Response:

{
  "took": 1014,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 14,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.0",
          "release_date": "2023-01-01",
          "description": "Initial release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "cSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.1",
          "release_date": "2023-02-15",
          "description": "Bug fix release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "ciWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.1.0",
          "release_date": "2023-05-10",
          "description": "Minor feature update"
        }
      },
      {
        "_index": "test_versions",
        "_id": "cyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "2.0.0",
          "release_date": "2024-01-01",
          "description": "Major release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "0.9.0",
          "release_date": "2022-12-01",
          "description": "Beta release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha",
          "release_date": "2023-03-01",
          "description": "Alpha pre-release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "diWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha.1",
          "release_date": "2023-03-10",
          "description": "Alpha patch"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-beta",
          "release_date": "2023-04-01",
          "description": "Beta pre-release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-rc.1",
          "release_date": "2023-04-15",
          "description": "Release candidate"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0+20230815",
          "release_date": "2023-08-15",
          "description": "Build metadata release"
        }
      }
    ]
  }
}

3b. term query

Request:

GET test_versions/_search
{
  "query": {
    "term": { "version": "1.0.1" }
  }
}

Response:

{
  "took": 5,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1.0466295,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cSWNQpcBY7cEASBv3Vr1",
        "_score": 1.0466295,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.1",
          "release_date": "2023-02-15",
          "description": "Bug fix release"
        }
      }
    ]
  }
}

3c. terms query

Request:

GET test_versions/_search
{
  "query": {
    "terms": {
      "version": ["1.0.0", "1.2.0-alpha"]
    }
  }
}

Response:

{
  "took": 26,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.0",
          "release_date": "2023-01-01",
          "description": "Initial release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-alpha",
          "release_date": "2023-07-15",
          "description": "Alpha version of 1.2"
        }
      }
    ]
  }
}

3d. range query

Request:

GET test_versions/_search
{
  "query": {
    "range": {
      "version": { "gte": "2.0.0" }
    }
  }
}

Response:

{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "2.0.0",
          "release_date": "2024-01-01",
          "description": "Major release"
        }
      }
    ]
  }
}

3e. exists query

Request:

GET test_versions/_search
{
  "query": {
    "exists": {
      "field": "version"
    }
  }
}

Response:

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 14,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.0",
          "release_date": "2023-01-01",
          "description": "Initial release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "cSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.1",
          "release_date": "2023-02-15",
          "description": "Bug fix release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "ciWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "1.1.0",
          "release_date": "2023-05-10",
          "description": "Minor feature update"
        }
      },
      {
        "_index": "test_versions",
        "_id": "cyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "AlphaApp",
          "version": "2.0.0",
          "release_date": "2024-01-01",
          "description": "Major release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "0.9.0",
          "release_date": "2022-12-01",
          "description": "Beta release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha",
          "release_date": "2023-03-01",
          "description": "Alpha pre-release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "diWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha.1",
          "release_date": "2023-03-10",
          "description": "Alpha patch"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-beta",
          "release_date": "2023-04-01",
          "description": "Beta pre-release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-rc.1",
          "release_date": "2023-04-15",
          "description": "Release candidate"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0+20230815",
          "release_date": "2023-08-15",
          "description": "Build metadata release"
        }
      }
    ]
  }
}

3f. match query

Request:

GET test_versions/_search
{
  "query": {
    "match": {
      "version": "1.0.0"
    }
  }
}

Response:

{
  "took": 16,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1.0466295,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_score": 1.0466295,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.0",
          "release_date": "2023-01-01",
          "description": "Initial release"
        }
      }
    ]
  }
}

3g. multi_match query

Request:

GET test_versions/_search
{
  "query": {
    "multi_match": {
      "query": "1.2.0-alpha.1",
      "fields": ["version", "description"]
    }
  }
}

Response:

{
  "took": 6,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3,
      "relation": "eq"
    },
    "max_score": 0.7540348,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "diWNQpcBY7cEASBv3Vr1",
        "_score": 0.7540348,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha.1",
          "release_date": "2023-03-10",
          "description": "Alpha patch"
        }
      },
      {
        "_index": "test_versions",
        "_id": "dSWNQpcBY7cEASBv3Vr1",
        "_score": 0.64823484,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha",
          "release_date": "2023-03-01",
          "description": "Alpha pre-release"
        }
      },
      {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_score": 0.5684715,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-alpha",
          "release_date": "2023-07-15",
          "description": "Alpha version of 1.2"
        }
      }
    ]
  }
}

3h. prefix query

Request:

GET test_versions/_search
{
  "query": {
    "prefix": {
      "version": {
        "value": "1.2.0-a"
      }
    }
  }
}

Response:

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-alpha",
          "release_date": "2023-07-15",
          "description": "Alpha version of 1.2"
        }
      }
    ]
  }
}

3i. wildcard query

Request:

GET test_versions/_search
{
  "query": {
    "wildcard": {
      "version": "1.2.0-*"
    }
  }
}

Response:

{
  "took": 5,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-alpha",
          "release_date": "2023-07-15",
          "description": "Alpha version of 1.2"
        }
      },
      {
        "_index": "test_versions",
        "_id": "fCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-beta.2",
          "release_date": "2023-08-01",
          "description": "Beta 2 version of 1.2"
        }
      },
      {
        "_index": "test_versions",
        "_id": "fSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-rc.1",
          "release_date": "2023-08-15",
          "description": "RC version of 1.2"
        }
      }
    ]
  }
}

3j. regex query

Request:

GET test_versions/_search
{
  "query": {
    "regexp": {
      "version": "1\\.2\\.0\\-[a-z]+\\.[0-9]+"
    }
  }
}

Response:

{
  "took": 8,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "fCWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-beta.2",
          "release_date": "2023-08-01",
          "description": "Beta 2 version of 1.2"
        }
      },
      {
        "_index": "test_versions",
        "_id": "fSWNQpcBY7cEASBv3Vr1",
        "_score": 1,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-rc.1",
          "release_date": "2023-08-15",
          "description": "RC version of 1.2"
        }
      }
    ]
  }
}

3k. match_phrase query

Request:

GET test_versions/_search
{
  "query": {
    "match_phrase": {
      "version": "1.2.0-beta.2"
    }
  }
}

Response:

{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1.0466295,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "fCWNQpcBY7cEASBv3Vr1",
        "_score": 1.0466295,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-beta.2",
          "release_date": "2023-08-01",
          "description": "Beta 2 version of 1.2"
        }
      }
    ]
  }
}

3l. sort query

Request:

GET test_versions/_search
{
  "query": { "match_all": {} },
  "sort": [
    { "version": { "order": "asc" }}
  ]
}

Response:

{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 14,
      "relation": "eq"
    },
    "max_score": null,
    "hits": [
      {
        "_index": "test_versions",
        "_id": "dCWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "0.9.0",
          "release_date": "2022-12-01",
          "description": "Beta release"
        },
        "sort": [
          "00000000000000000000.00000000000000000009.00000000000000000000~"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "dSWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha",
          "release_date": "2023-03-01",
          "description": "Alpha pre-release"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000-alpha"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "diWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-alpha.1",
          "release_date": "2023-03-10",
          "description": "Alpha patch"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000-alpha.1"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "dyWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-beta",
          "release_date": "2023-04-01",
          "description": "Beta pre-release"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000-beta"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "eCWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0-rc.1",
          "release_date": "2023-04-15",
          "description": "Release candidate"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000-rc.1"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "cCWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.0",
          "release_date": "2023-01-01",
          "description": "Initial release"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000~"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "eSWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "BetaApp",
          "version": "1.0.0+20230815",
          "release_date": "2023-08-15",
          "description": "Build metadata release"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000000~"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "cSWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "AlphaApp",
          "version": "1.0.1",
          "release_date": "2023-02-15",
          "description": "Bug fix release"
        },
        "sort": [
          "00000000000000000001.00000000000000000000.00000000000000000001~"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "ciWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "AlphaApp",
          "version": "1.1.0",
          "release_date": "2023-05-10",
          "description": "Minor feature update"
        },
        "sort": [
          "00000000000000000001.00000000000000000001.00000000000000000000~"
        ]
      },
      {
        "_index": "test_versions",
        "_id": "eyWNQpcBY7cEASBv3Vr1",
        "_score": null,
        "_source": {
          "app": "GammaApp",
          "version": "1.2.0-alpha",
          "release_date": "2023-07-15",
          "description": "Alpha version of 1.2"
        },
        "sort": [
          "00000000000000000001.00000000000000000002.00000000000000000000-alpha"
        ]
      }
    ]
  }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@deshsidd deshsidd changed the title Add Semantic Version field type mapper and extensive unit tests draft: Add Semantic Version field type mapper and extensive unit tests Jun 6, 2025
@deshsidd deshsidd marked this pull request as draft June 6, 2025 00:38
@deshsidd deshsidd changed the title draft: Add Semantic Version field type mapper and extensive unit tests Add Semantic Version field type mapper and extensive unit tests Jun 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

❌ Gradle check result for 1ef2de7: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@deshsidd deshsidd force-pushed the sid/version-field branch from 1ef2de7 to f7bfb98 Compare June 6, 2025 01:25
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

❌ Gradle check result for f7bfb98: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@deshsidd deshsidd force-pushed the sid/version-field branch from f7bfb98 to a9bdd73 Compare June 6, 2025 19:13
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

❌ Gradle check result for a9bdd73: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@deshsidd deshsidd marked this pull request as ready for review June 6, 2025 20:01
Copy link
Contributor

@harshavamsi harshavamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing of the Semantic Version looks alright to me but the FieldMapper needs some tweaks

@deshsidd deshsidd force-pushed the sid/version-field branch from 1dd45b7 to 069baff Compare June 26, 2025 20:49
@github-actions
Copy link
Contributor

❌ Gradle check result for 069baff: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@deshsidd deshsidd force-pushed the sid/version-field branch from 069baff to 6067396 Compare July 2, 2025 20:47
@deshsidd
Copy link
Contributor Author

deshsidd commented Jul 2, 2025

@harshavamsi @cwperks Thanks for the reviews. Made changes to refactor SemanticVersionFieldMapper for flexible index, store, and doc_values support and have addressed all the review comments.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2025

✅ Gradle check result for 6067396: SUCCESS

@codecov
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

Attention: Patch coverage is 90.12346% with 24 lines in your changes missing coverage. Please review.

Project coverage is 72.74%. Comparing base (a04c5ba) to head (f264fbc).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...earch/index/mapper/SemanticVersionFieldMapper.java 88.74% 6 Missing and 11 partials ⚠️
...a/org/opensearch/index/mapper/SemanticVersion.java 92.30% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18454      +/-   ##
============================================
+ Coverage     72.68%   72.74%   +0.05%     
- Complexity    68453    68482      +29     
============================================
  Files          5568     5570       +2     
  Lines        314403   314646     +243     
  Branches      45599    45661      +62     
============================================
+ Hits         228538   228897     +359     
+ Misses        67324    67204     -120     
- Partials      18541    18545       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@deshsidd deshsidd force-pushed the sid/version-field branch 2 times, most recently from 26ba7ec to aaf4146 Compare July 2, 2025 23:13
@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2025

❌ Gradle check result for aaf4146: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@deshsidd deshsidd force-pushed the sid/version-field branch from aaf4146 to ca9fa20 Compare July 2, 2025 23:59
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2025

✅ Gradle check result for ca9fa20: SUCCESS

Copy link
Contributor

@harshavamsi harshavamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
@deshsidd deshsidd force-pushed the sid/version-field branch from ca9fa20 to 8a53b1b Compare July 7, 2025 18:48
…c_values support

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
@deshsidd deshsidd force-pushed the sid/version-field branch from 8a53b1b to f264fbc Compare July 7, 2025 18:58
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

✅ Gradle check result for f264fbc: SUCCESS

@cwperks cwperks merged commit f4ca647 into opensearch-project:main Jul 7, 2025
31 checks passed
@cwperks
Copy link
Member

cwperks commented Jul 7, 2025

@deshsidd Please open a documentation PR for this change

vishdivs pushed a commit to vishdivs/OpenSearch that referenced this pull request Jul 14, 2025
* Add Semantic Version field type mapper and extensive unit tests

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

* Refactor SemanticVersionFieldMapper for flexible index, store, and doc_values support

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

---------

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
animodak7 added a commit to animodak7/OpenSearch that referenced this pull request Jul 16, 2025
* Fix regex query to work with field alias (opensearch-project#18215)

---------

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>
Co-authored-by: Ankit Jain <akjain@amazon.com>

* Add workflow to automatically trigger manifest generation process (opensearch-project#18629)

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Bump com.squareup.okio:okio from 3.13.0 to 3.14.0 in /test/fixtures/hdfs-fixture (opensearch-project#18645)

* Bump com.squareup.okio:okio in /test/fixtures/hdfs-fixture

Bumps [com.squareup.okio:okio](https://github.com/square/okio) from 3.13.0 to 3.14.0.
- [Release notes](https://github.com/square/okio/releases)
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.13.0...parent-3.14.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio
  dependency-version: 3.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix credentials format (opensearch-project#18651)

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Provide aux transport to SecureAuxTransportSettingsProvider (opensearch-project#18616)

* Pass aux transport to secure settings parameters().

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Update javadocs, fix UTs.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Spotless apply

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Pass aux transport key as unique identifier instead of transport ref.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Consistent naming. auxTransportSettingKey -> auxTransportType.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Changelog.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Spotless apply

Signed-off-by: Finn Carroll <carrofin@amazon.com>

---------

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Making snapshot store/restore rate dynamic (opensearch-project#18069)

* Making snapshot store/restore rate dynamic

Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: kkewwei <kkewwei@163.com>

* simple the code

Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: kkewwei <kkewwei@163.com>

---------

Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: kkewwei <kkewwei@163.com>

* Bump com.netflix.nebula.ospackage-base from 11.11.2 to 12.0.0 in /distribution/packages (opensearch-project#18646)

* Bump com.netflix.nebula.ospackage-base in /distribution/packages

Bumps com.netflix.nebula.ospackage-base from 11.11.2 to 12.0.0.

---
updated-dependencies:
- dependency-name: com.netflix.nebula.ospackage-base
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>

* Extend Profiler to allow for non-timing info (opensearch-project#18631)

* copied from other branch, ready for pr

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* cleanup from merging

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* another spotless apply and fixed breaking change

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* another spotlessApply

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* forgot to change back concurrent agg stuff

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* forgot to spotless after prev fix

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* added more unit tests for coverage

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* changed to supplier, removed timer ctors

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* made feedback changes

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* forgot javadoc for new class

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* forgot to revert name to toString

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* fix count check in concurrentquerypb

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

* unmodifiable map add

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>

---------

Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
Signed-off-by: TJ Neuenfeldt <56700214+neuenfeldttj@users.noreply.github.com>

* [Bug Fix] Fix the backward compatibility regression with `COMPLEMENT` for Regexp queries introduced in OpenSearch 3.0 (opensearch-project#18640)

* FIx ~ bug

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Update changelog

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

---------

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* [WLM] Make resource usage value cacheable for NodeDuressTrackers (opensearch-project#18649)

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>
Co-authored-by: Ankit Jain <akjain@amazon.com>

* Fix bugs in replication lag computation (opensearch-project#18602)

* Fix bug in replication lag computation.

This change fixes a bug with replication lag computation to correctly use epoch reference point with Instant.now() and DateUtils.
This change also fixes pruning logic to correctly remove the latest synced to checkpoint from tracking.  Previously we would only
prune up to the latest.  This ensures that when a new checkpoint is eventually received we aren't incorrectly computing lag from the synced-to checkpoint.

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>

* add changelog entry

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>

* Fix flaky test to hardcode time lag between checkpoint arrival.

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>

---------

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>

* Replace LegacyESVersion.fromString with Version.fromString (opensearch-project#18567)



---------

Signed-off-by: Du Tran <quangdutran809@gmail.com>

* Inject QueryCollectorSpecFactory from Plugins to create QueryCollectorContext in QueryPhase (opensearch-project#18637)

* Initial Commit

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Javadocs

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Factory design pattern for QueryCollectorContextSpec

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Fixing Concurrent Segment Search

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Remove spec

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Renaming method

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Javadoc

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Removing support method from QueryCollectorContextSpecFactory

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Adding javadoc

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Add changelog

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Add experimentalAPI annotation

Signed-off-by: Varun Jain <varunudr@amazon.com>

* remove redundant check from getQueryCollectorContextSpec method

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Add unit tests

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Remove Test annotation

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Reformatting

Signed-off-by: Varun Jain <varunudr@amazon.com>

---------

Signed-off-by: Varun Jain <varunudr@amazon.com>

* Bump com.azure:azure-storage-blob from 12.30.0 to 12.30.1 in /plugins/repository-azure (opensearch-project#18644)

* Bump com.azure:azure-storage-blob in /plugins/repository-azure

Bumps [com.azure:azure-storage-blob](https://github.com/Azure/azure-sdk-for-java) from 12.30.0 to 12.30.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@azure-storage-blob_12.30.0...azure-storage-blob_12.30.1)

---
updated-dependencies:
- dependency-name: com.azure:azure-storage-blob
  dependency-version: 12.30.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix checkpoint handling to prevent segment replication infinite loop (opensearch-project#18636)

* Fix checkpoint handling to prevent segment replication infinite loop

Signed-off-by: Ashish Singh <ssashish@amazon.com>

* Modify existing test to verify code change behaviour

Signed-off-by: Ashish Singh <ssashish@amazon.com>

---------

Signed-off-by: Ashish Singh <ssashish@amazon.com>

* Extend Approximation Framework to other numeric types (opensearch-project#18530)

* Extend approximation to other numeric types

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Fix basic tests

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Fix basic tests

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Add Parameterized tests for all numeric types

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Fix FieldSortIT

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Fix FieldSortIT

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Address comments

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Update tests and changelog

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Update tests and changelog

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

---------

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Bump BouncyCastle and password4j (opensearch-project#18668)

Changes:
- Bump org.bouncycastle:bctls-fips from 2.0.19 to 2.0.20
- Bump org.bouncycastle:bcpkix-fips from 2.0.7 to 2.0.8
- Bump org.bouncycastle:bcpg-fips from 2.0.10 to 2.0.11
- Bump com.password4j:password4j from 1.8.2 to 1.8.3

Signed-off-by: Andrey Pleskach <ples@aiven.io>

* Add support for custom index name resolver from cluster plugin (opensearch-project#18593)

Signed-off-by: Gagan Singh Saini <gagasa@amazon.com>

* Remove clone holder and add Cleaner logic to clean up clones in FullFileCachedIndexInput (opensearch-project#18662)

Signed-off-by: Shreyansh Ray <rayshrey@amazon.com>

* Disallow resize for Warm Index, add Parameterized ITs for close in remote store (opensearch-project#18686)

Signed-off-by: Gagan Singh Saini <gagasa@amazon.com>
Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>

* Added support for range version support in semver (opensearch-project#18557)

* Added support for range version support in semver

Signed-off-by: Shruti Garg <shrugarg@amazon.com>

* Added test coverage for missing lines

Signed-off-by: Shruti Garg <shrugarg@amazon.com>

* Fixed for non reachable code line and tests

Signed-off-by: Shruti Garg <shrugarg@amazon.com>

---------

Signed-off-by: Shruti Garg <shrugarg@amazon.com>

* An attempt to fix flaky SecureReactorNetty4HttpServerTransportTests (opensearch-project#18680)

Signed-off-by: Andriy Redko <drreta@gmail.com>

* Bump com.squareup.okio:okio from 3.14.0 to 3.15.0 in /test/fixtures/hdfs-fixture (opensearch-project#18689)

* Bump com.squareup.okio:okio in /test/fixtures/hdfs-fixture

Bumps [com.squareup.okio:okio](https://github.com/square/okio) from 3.14.0 to 3.15.0.
- [Release notes](https://github.com/square/okio/releases)
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.14.0...parent-3.15.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio
  dependency-version: 3.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add Semantic Version field type mapper (opensearch-project#18454)

* Add Semantic Version field type mapper and extensive unit tests

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

* Refactor SemanticVersionFieldMapper for flexible index, store, and doc_values support

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

---------

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

* Bump com.azure:azure-core from 1.55.3 to 1.55.5 in /plugins/repository-azure (opensearch-project#18691)

* Bump com.azure:azure-core in /plugins/repository-azure

Bumps [com.azure:azure-core](https://github.com/Azure/azure-sdk-for-java) from 1.55.3 to 1.55.5.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@azure-core_1.55.3...azure-core_1.55.5)

---
updated-dependencies:
- dependency-name: com.azure:azure-core
  dependency-version: 1.55.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Exposing default codec from codec service (opensearch-project#18698)

* Exposing default codec from codec service

Signed-off-by: bharath-techie <bharath78910@gmail.com>

* addressing comments

Signed-off-by: bharath-techie <bharath78910@gmail.com>

---------

Signed-off-by: bharath-techie <bharath78910@gmail.com>

* Replace CPU load average logic with AverageTracker class and modify default thresholds (opensearch-project#18666)

Signed-off-by: Harsh Kothari <techarsh@amazon.com>

* Rename all query group references to workload group (opensearch-project#18711)

Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* Rename WorkloadGroupTestUtil to WorkloadManagementTestUtil (opensearch-project#18709)

Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* Add Prudhvi Godithi (GH: prudhvigodithi) as a maintainer (opensearch-project#18690)

* Add Prudhvi Godithi (GH: prudhvigodithi) as a maintainer

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Keep spaces

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix spacing

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Pass index settings to system ingest processor factories. (opensearch-project#18708)

Signed-off-by: Bo Zhang <bzhangam@amazon.com>

* Include named queries from rescore contexts in matched_queries array (opensearch-project#18697)

* Fix: Include named queries from rescore contexts in matched_queries array

- Modified QueryRescoreContext to store ParsedQuery instead of just Query
- Updated QueryRescorerBuilder to use context.toQuery() for capturing named queries
- Enhanced MatchedQueriesPhase to collect named queries from all rescore contexts
- Added comprehensive tests for both unit and REST API scenarios
- Resolves inconsistency with Elasticsearch behavior where rescore named queries were not surfaced
- Cleaned up unnecessary comments for better code readability

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>

* Address maintainer feedback: update RescoreContext interface design

- Added parsedQuery() method to RescoreContext interface
- Added getParsedQueries() method to RescoreContext interface
- Updated QueryRescoreContext to override interface methods
- Removed instanceof check in MatchedQueriesPhase by using interface method
- Simplified assignment in QueryRescorerBuilder to one line

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>

* Complete interface replacement: replace query() with parsedQuery() and getQueries() with getParsedQueries()

- Removed query() method from QueryRescoreContext
- Removed getQueries() method from RescoreContext interface
- Updated all callers to use parsedQuery().query() instead of query()
- Updated DfsPhase to use getParsedQueries() instead of getQueries()
- Updated QueryRescorer to use parsedQuery().query() for rescoring and explanations
- Updated QueryRescorerBuilderTests to use parsedQuery().query()
- This addresses the maintainer's feedback for a cleaner interface design

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>

* Finalize interface design and move changelog entry to Added section

- Removed parsedQuery() method from RescoreContext base interface
- Renamed getParsedQuery() to parsedQuery() in QueryRescoreContext for consistency
- Updated all callers to use parsedQuery() method
- Moved changelog entry to 'Added' section (more appropriate than 'Fixed')
- Added proper imports for ParsedQuery to improve code readability
- All tests pass and code formatting is correct

Final interface design:
- RescoreContext: only getParsedQueries() (returns List<ParsedQuery>)
- QueryRescoreContext: parsedQuery() + getParsedQueries() override
- MatchedQueriesPhase: uses getParsedQueries().forEach() for clean iteration

This addresses all maintainer feedback from @mch2 and provides a clean,
well-tested implementation that surfaces named queries from rescore contexts
in the matched_queries array.

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>

* Maintain backward compatibility for RescoreContext public API

- Restore getQueries() method for backward compatibility
- Add getParsedQueries() method for new functionality

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>

* Fix mixed cluster test failure by updating skip version to 3.2.0

Signed-off-by: girish jeyakumar <girishjeyakumar@dropbox.com>

---------

Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>
Signed-off-by: girish jeyakumar <girishjeyakumar@dropbox.com>
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
Co-authored-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>
Co-authored-by: Marc Handalian <marc.handalian@gmail.com>

* Move gRPC transitive dependencies to expected version (opensearch-project#18672)

* Some explicit transient gRPC deps are not the expected version.

grpc-netty-shaded:1.68.2 expects perfmark-api:0.27.0
guava:33.2.1-jre expects failureaccess:1.0.2

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Update license shas.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Changelog.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Rebase changelog.

Signed-off-by: Finn Carroll <carrofin@amazon.com>

---------

Signed-off-by: Finn Carroll <carrofin@amazon.com>

* Modify wlm logging message (opensearch-project#18712)

Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* [WLM] Introduce rule cardinality check (opensearch-project#18663)

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* [WLM] Add WLM mode validation for workload group CRUD requests (opensearch-project#18652)

Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>

* Allow upload of translog-1 generation while migrating to remote (opensearch-project#18713)

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>

* Fix max_score is null when using _score as a primary sort (opensearch-project#18715)

* Fix max_score is null when sorting on score firstly

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* modify changelog

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

---------

Signed-off-by: Binlong Gao <gbinlong@amazon.com>

* Changes for the Upload Workflow for merged segments (opensearch-project#18610)

* Changes for the Upload Workflow for merged segments

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Addressed Todos

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Added Test Cases

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Removed the usage of Forbidden APIs

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Updated the code to include priority upload as paramter

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Updated the remote listener to use remote upploader interface

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Added JavaDocs across the changes

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Addressed spotless check

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Dummy commit(can be reverted)

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

* Revert "Dummy commit(can be reverted)"

This reverts commit e542b99.

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>

---------

Signed-off-by: Aditi Goyal <adgoyal@amazon.com>
Co-authored-by: Aditi Goyal <adgoyal@amazon.com>

* Modify merged segment pre-copy classes licenses (opensearch-project#18737)

Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>

* `Lucene.java` Code Improvement (opensearch-project#18710)

* Code Improvement

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Code Improvement with a new method

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

---------

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>

* Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0 in /plugins/repository-hdfs (opensearch-project#18745)

* Bump org.apache.commons:commons-lang3 in /plugins/repository-hdfs

Bumps org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.apache.logging.log4j:log4j-core from 2.25.0 to 2.25.1 in /buildSrc/src/testKit/thirdPartyAudit/sample_jars (opensearch-project#18744)

* Bump org.apache.logging.log4j:log4j-core

Bumps org.apache.logging.log4j:log4j-core from 2.25.0 to 2.25.1.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump com.azure:azure-storage-common from 12.29.0 to 12.29.1 in /plugins/repository-azure (opensearch-project#18742)

* Bump com.azure:azure-storage-common in /plugins/repository-azure

Bumps [com.azure:azure-storage-common](https://github.com/Azure/azure-sdk-for-java) from 12.29.0 to 12.29.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@azure-storage-blob_12.29.0...azure-storage-blob_12.29.1)

---
updated-dependencies:
- dependency-name: com.azure:azure-storage-common
  dependency-version: 12.29.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating SHAs

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>

* Bump com.google.jimfs:jimfs from 1.3.0 to 1.3.1 in /distribution/tools/plugin-cli (opensearch-project#18743)

* Bump com.google.jimfs:jimfs in /distribution/tools/plugin-cli

Bumps [com.google.jimfs:jimfs](https://github.com/google/jimfs) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/google/jimfs/releases)
- [Commits](google/jimfs@v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: com.google.jimfs:jimfs
  dependency-version: 1.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>

* Fix sync method to account for block files in Composite Directory (opensearch-project#18660)

Signed-off-by: Shreyansh Ray <rayshrey@amazon.com>

* [Cleanup] Remove upgrade-cli tool and related build references (opensearch-project#18494)

The `upgrade-cli` tool is deprecated and no longer needed.

- Removed: distribution/tools/upgrade-cli
- Cleaned up: settings.gradle, distribution/build.gradle
- Deleted: distribution/src/bin/opensearch-upgrade(.bat)

Signed-off-by: BeomSeogKim <kbs4520@daum.net>

* Improve test instructions in developer guide (opensearch-project#18736)

Signed-off-by: Shahbaz Aamir <shahbaz07dbit@gmail.com>

* [Experimental] Start without joining a cluster if a "clusterless" ClusterPlugin is loaded (opensearch-project#18479)

These are the core changes to allow ClusterPlugins to manage cluster
state on behalf of an OpenSearch node. If a "clusterless" ClusterPlugin
is loaded, then the node will start up with dummy versions of Discovery
and ClusterManagerService, and will load the minimum cluster state
required for startup (essentially, the node needs to see itself). From
there, the ClusterPlugin can interact with ClusterApplierService to apply
some cluster state to the node. (The details of constructing/receiving
that cluster state is up to the plugin.) 

---------

Signed-off-by: Michael Froh <msfroh@apache.org>

* Check CircuitBreaker before put/compute in FileCache to avoid entry removal (opensearch-project#18661)

Signed-off-by: Shreyansh Ray <rayshrey@amazon.com>

* Fix UNIX domain socket permission checks on Windows (opensearch-project#18764)

Signed-off-by: Andriy Redko <drreta@gmail.com>

---------

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Signed-off-by: kkewwei <kewei.11@bytedance.com>
Signed-off-by: kkewwei <kkewwei@163.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
Signed-off-by: TJ Neuenfeldt <56700214+neuenfeldttj@users.noreply.github.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
Signed-off-by: Du Tran <quangdutran809@gmail.com>
Signed-off-by: Varun Jain <varunudr@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Andrey Pleskach <ples@aiven.io>
Signed-off-by: Gagan Singh Saini <gagasa@amazon.com>
Signed-off-by: Shreyansh Ray <rayshrey@amazon.com>
Signed-off-by: Shruti Garg <shrugarg@amazon.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: bharath-techie <bharath78910@gmail.com>
Signed-off-by: Harsh Kothari <techarsh@amazon.com>
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
Signed-off-by: Bo Zhang <bzhangam@amazon.com>
Signed-off-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>
Signed-off-by: girish jeyakumar <girishjeyakumar@dropbox.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Aditi Goyal <adgoyal@amazon.com>
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: BeomSeogKim <kbs4520@daum.net>
Signed-off-by: Shahbaz Aamir <shahbaz07dbit@gmail.com>
Signed-off-by: Michael Froh <msfroh@apache.org>
Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>
Co-authored-by: Ankit Jain <akjain@amazon.com>
Co-authored-by: Sayali Gaikawad <gaiksaya@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Finn <carrofin@amazon.com>
Co-authored-by: kkewwei <kewei.11@bytedance.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: TJ Neuenfeldt <56700214+neuenfeldttj@users.noreply.github.com>
Co-authored-by: Prudhvi Godithi <pgodithi@amazon.com>
Co-authored-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Co-authored-by: Marc Handalian <marc.handalian@gmail.com>
Co-authored-by: Trần Quang Dự <quangdutran809@gmail.com>
Co-authored-by: Varun Jain <varunudr@amazon.com>
Co-authored-by: Ashish Singh <ssashish@amazon.com>
Co-authored-by: Andrey Pleskach <ples@aiven.io>
Co-authored-by: Gagan6164 <32809202+Gagan6164@users.noreply.github.com>
Co-authored-by: rayshrey <121871912+rayshrey@users.noreply.github.com>
Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>
Co-authored-by: shrugarg-amzn <shrugarg@amazon.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: Siddhant Deshmukh <deshsid@amazon.com>
Co-authored-by: Bharathwaj G <bharath78910@gmail.com>
Co-authored-by: Harsh Kothari <harsh.77424@gmail.com>
Co-authored-by: Ruirui Zhang <mariazrr@amazon.com>
Co-authored-by: Bo Zhang <bzhangam@amazon.com>
Co-authored-by: Girish Jeyakumar <9464353+girishjeyakumar@users.noreply.github.com>
Co-authored-by: Girish Jeyakumar <girishjeyakumar@dropbox.com>
Co-authored-by: Gaurav Bafna <85113518+gbbafna@users.noreply.github.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: Aditi Goyal <31741158+Adiiigo@users.noreply.github.com>
Co-authored-by: Aditi Goyal <adgoyal@amazon.com>
Co-authored-by: guojialiang <guojialiang.2012@bytedance.com>
Co-authored-by: Adrian-Kim <110332047+BeomSeogKim@users.noreply.github.com>
Co-authored-by: Shahbaz Aamir <shahbaz07dbit@gmail.com>
Co-authored-by: Michael Froh <msfroh@apache.org>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
* Add Semantic Version field type mapper and extensive unit tests

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

* Refactor SemanticVersionFieldMapper for flexible index, store, and doc_values support

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>

---------

Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
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

Successfully merging this pull request may close these issues.

3 participants