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

[NAE-2053] Optimize ElasticCaseService queries to eliminate maxClauseCount error #287

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

machacjozef
Copy link
Member

@machacjozef machacjozef commented Feb 13, 2025

Description

  • ElasticCaseService, ElasticViewPermissionService: refactored queries to use termsQuery and filter, reducing clause count.
  • pom.xml: updated spring-session to spring-session-core

more info:
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-term-query.html
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-terms-query.html

Fixes NAE-2053

Dependencies

Third party dependencies

Change dependency from

    <dependency>
        <groupId>org.springframework.session</groupId>
        <artifactId>spring-session</artifactId>
        <version>2.0.0.M2</version>
    </dependency>

to:

    <dependency>
        <groupId>org.springframework.session</groupId>
        <artifactId>spring-session-core</artifactId>
    </dependency>

Blocking Pull requests

There are no dependencies on other PR

How Has Been This Tested?

  • test data from etask

Test Configuration

<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc.>

Name Tested on
OS macOS Sequoia 15.3
Runtime Java 11.0.25
Dependency Manager Maven 3.9.9
Framework version Spring Boot 2.7.0
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @mazarijuraj
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

…Count error

- ElasticCaseService, ElasticViewPermissionService: refactored queries to use termsQuery and filter, reducing clause count.
- pom.xml: updated spring-session to spring-session-core.
@machacjozef machacjozef added the bugfix A change that fixes a bug label Feb 13, 2025
@machacjozef machacjozef self-assigned this Feb 13, 2025
tuplle
tuplle previously approved these changes Feb 13, 2025
@machacjozef
Copy link
Member Author

Testy nepresli kvoli sonaru:

2025-02-13T12:31:08.2005497Z [ERROR] Could not find a default branch for project with key 'netgrif_application-engine'. Make sure project exists.
2025-02-13T12:31:08.5283326Z [INFO] ------------------------------------------------------------------------
2025-02-13T12:31:08.5284020Z [INFO] BUILD FAILURE
2025-02-13T12:31:08.5284782Z [INFO] ------------------------------------------------------------------------
2025-02-13T12:31:08.5285440Z [INFO] Total time: 13:41 min
2025-02-13T12:31:08.5286055Z [INFO] Finished at: 2025-02-13T12:31:08Z
2025-02-13T12:31:08.5287673Z [INFO] ------------------------------------------------------------------------
2025-02-13T12:31:08.5291948Z [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonar (default-cli) on project application-engine: Analysis failed -> [Help 1]

PS ked tak potom sa na to pozriem....

Retoocs
Retoocs previously approved these changes Feb 13, 2025
renczesstefan
renczesstefan previously approved these changes Feb 17, 2025
…Count error

- ElasticCaseService: incorporation of reminders from PR
@machacjozef machacjozef dismissed stale reviews from renczesstefan, Retoocs, and tuplle via 67b38ea February 17, 2025 10:50
@machacjozef machacjozef merged commit 126b469 into release/6.2.10 Feb 17, 2025
5 of 6 checks passed
@machacjozef machacjozef deleted the NAE-2053 branch February 17, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix A change that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants