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

Change lower bound of Pagination depth from 0 to 1 #1116

Closed

Conversation

vibrantvarun
Copy link
Member

@vibrantvarun vibrantvarun commented Jan 16, 2025

Description

Change lower bound of Pagination depth from 0 to 1

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@yuye-aws
Copy link
Member

@vibrantvarun Can you explain the intuition behind this PR?

@vibrantvarun vibrantvarun changed the title Change lower bound of Pagination depth from 1 to 0 Change lower bound of Pagination depth from 0 to 1 Jan 16, 2025
@vibrantvarun
Copy link
Member Author

@yuye-aws by mistake I added the lower bound as 0 but it should be 1 for pagination_depth.

Copy link
Member

@yuye-aws yuye-aws left a comment

Choose a reason for hiding this comment

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

Looks good to me

@vibrantvarun
Copy link
Member Author

Do not merge the PR now as one test case is failing

@yuye-aws
Copy link
Member

Do not merge the PR now as one test case is failing

Suite: Test class org.opensearch.neuralsearch.query.HybridQueryBuilderTests
  2> REPRODUCE WITH: ./gradlew ':test' --tests "org.opensearch.neuralsearch.query.HybridQueryBuilderTests.testDoToQuery_whenPaginationDepthIsLessThanZero_thenBuildSuccessfully" -Dtests.seed=F83E1B8EB544A3FA -Dtests.security.manager=false -Dtests.locale=sg -Dtests.timezone=America/Recife -Druntime.java=21
  2> java.lang.AssertionError: 
    Expected: a string containing "pagination_depth should be greater than 0"
         but: was "pagination_depth should be greater than 1"
        at __randomizedtesting.SeedInfo.seed([F83E1B8EB544A3FA:DA84E2A936CBAFB0]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:964)
        at org.junit.Assert.assertThat(Assert.java:930)
        at org.opensearch.neuralsearch.query.HybridQueryBuilderTests.testDoToQuery_whenPaginationDepthIsLessThanZero_thenBuildSuccessfully(HybridQueryBuilderTests.java:291)
  2> NOTE: leaving temporary files on disk at: /__w/neural-search/neural-search/build/testrun/test/temp/org.opensearch.neuralsearch.query.HybridQueryBuilderTests_F83E1B8EB544A3FA-001
  2> NOTE: test params are: codec=Asserting(Lucene912): {}, docValues:{}, maxPointsInLeafNode=551, maxMBSortInHeap=7.2605237397722355, sim=Asserting(RandomSimilarity(queryNorm=true): {}), locale=sg, timezone=America/Recife
  2> NOTE: Linux 6.8.0-1017-azure amd64/Eclipse Adoptium 21.0.5 (64-bit)/cpus=4,threads=1,free=440332952,total=536870912
  2> NOTE: All tests run in this JVM: [NeuralSearchTests, MLCommonsClientAccessorTests, AbstractScoreHybridizationProcessorTests, ExplanationResponseProcessorTests, NeuralQueryEnricherProcessorTests, NormalizationProcessorTests, RRFProcessorTests, ScoreNormalizationTechniqueTests, TextChunkingProcessorTests, TextImageEmbeddingProcessorTests, ChunkerParameterParserTests, FixedTokenLengthChunkerTests, BaseScoreCombinationTechniqueTests, HarmonicMeanScoreCombinationTechniqueTests, ScoreCombinationFactoryTests, ExplanationUtilsTests, NormalizationProcessorFactoryTests, RerankProcessorFactoryTests, TextChunkingProcessorFactoryTests, L2ScoreNormalizationTechniqueTests, RRFNormalizationTechniqueTests, ByFieldRerankProcessorTests, HybridQueryBuilderTests]

615 tests completed, 1 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants