Skip to content

refactor(elasticSearch): simplify query building logic and add new fe… #1270

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AfroTechBoss
Copy link

…atures

  • Remove unused geo point and regex functions
  • Add support for fuzzy queries and proper wildcard escaping
  • Improve handling of array values and negation cases
  • Add ES syntax version constants for better version control
  • Simplify range parameter building and field determination

closes issue- #1265

…atures

- Remove unused geo point and regex functions
- Add support for fuzzy queries and proper wildcard escaping
- Improve handling of array values and negation cases
- Add ES syntax version constants for better version control
- Simplify range parameter building and field determination
Copy link

codesandbox bot commented Jun 1, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Jun 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-awesome-query-builder-examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 0:08am
react-awesome-query-builder-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2025 0:08am
react-awesome-query-builder-sandbox-next ✅ Ready (Inspect) Visit Preview Jun 5, 2025 0:08am

Copy link

codesandbox-ci bot commented Jun 1, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c431177:

Sandbox Source
@react-awesome-query-builder/examples Configuration
@react-awesome-query-builder/sandbox Configuration
@react-awesome-query-builder/sandbox-simple Configuration
@react-awesome-query-builder/sandbox-next Configuration

@ukrbublik
Copy link
Owner

Please use pnpm 8 and discard changes to lockfile and package.json

Ran pnpm 8, discarded changes made to package.json and lock file
@AfroTechBoss
Copy link
Author

Please use pnpm 8 and discard changes to lockfile and package.json

Done

@ukrbublik
Copy link
Owner

ukrbublik commented Jun 2, 2025

Please fix the failing tests.

Looks like this failing test indicates issue (regression?) with handling of lists:
Screenshot 2025-06-02 at 11 29 42

Could you please add tests for new features (fuzzy queries, wildcard escaping)?

https://github.com/ukrbublik/react-awesome-query-builder/tree/master/packages/tests#watch-mode
https://github.com/ukrbublik/react-awesome-query-builder/tree/master/packages/tests#run-selected-specs

I've removed changes to a lock file from your branch to fix issues with CI (pnpm lock file should have version 6)

@AfroTechBoss
Copy link
Author

Please fix the failing tests.

Looks like this failing test indicates issue (regression?) with handling of lists: Screenshot 2025-06-02 at 11 29 42

Could you please add tests for new features (fuzzy queries, wildcard escaping)?

https://github.com/ukrbublik/react-awesome-query-builder/tree/master/packages/tests#watch-mode https://github.com/ukrbublik/react-awesome-query-builder/tree/master/packages/tests#run-selected-specs

I've removed changes to a lock file from your branch to fix issues with CI (pnpm lock file should have version 6)

GM @ukrbublik, I made the changes 2 days ago...
Hoping you can review and merge

}]
}, config)!;
const { fixedTree } = Utils.sanitizeTree(tree, config);
expect(Utils.jsonLogicFormat(fixedTree, config)).to.deep.equal({
Copy link
Owner

Choose a reason for hiding this comment

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

You should test the result of exporting to ES format rather than to JsonLogic format.

Utils.elasticSearchFormat(fixedTree, config)

Copy link
Owner

@ukrbublik ukrbublik left a comment

Choose a reason for hiding this comment

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

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.

2 participants