Skip to content

[BUG] QueryPhaseTests#testMaxScoreWithSortOnScoreAndCollapsingResults will produce a compilation error. #19456

@guojialiang92

Description

@guojialiang92

Describe the bug

I encountered this issue during the gradle test of #[19436].
Detailed error information is in link. The error message is:

* What went wrong:
Execution failed for task ':server:compileTestJava'.
> Compilation failed; see the compiler output below.
  /home/runner/work/OpenSearch/OpenSearch/server/src/test/java/org/opensearch/search/query/QueryPhaseTests.java:1109: error: no suitable constructor found for NumberFieldType(String,NumberType,boolean,boolean,boolean,boolean,<null>,Map<Object,Object>)
              new NumberFieldType("user", NumberType.INTEGER, true, false, true, false, null, Collections.emptyMap())
              ^
      constructor NumberFieldType.NumberFieldType(String,NumberType,boolean,boolean,boolean,boolean,boolean,Number,Map<String,String>) is not applicable
        (actual and formal argument lists differ in length)
      constructor NumberFieldType.NumberFieldType(String,Builder) is not applicable
        (actual and formal argument lists differ in length)
      constructor NumberFieldType.NumberFieldType(String,NumberType) is not applicable
        (actual and formal argument lists differ in length)
  1 error

It seems that this bug was introduced in #[19181].
I will submit a PR to fix it.

Related component

Other

To Reproduce

This is a compile error, and I've seen similar errors in other PRs as well.

Expected behavior

Expected to run normally

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions