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

ElasticSearch query doesn't apply #11258

Closed
igorvolocRC opened this issue Oct 15, 2024 · 8 comments
Closed

ElasticSearch query doesn't apply #11258

igorvolocRC opened this issue Oct 15, 2024 · 8 comments
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@igorvolocRC
Copy link

Bug Description

When executing a search query in the Elasticsearch node, the intended filtering is not applied. Instead of returning the correct subset of matching documents, the search retrieves all the most recent documents up to the specified limit or the maximum default limit of 10,000 documents.

I noticed this after the upgrade from 1.55.2 -> 1.62.5

Tomorrow, I'll provide more details.

To Reproduce

  1. Write any query to filter some documents for an index
  2. when executing the node, the query will not be applied

Expected behavior

The query should be applied to filter documents.

Operating System

n8nio/n8n:1.62.5

n8n Version

1.62.5

Node.js Version

n8nio/n8n:1.62.5

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Oct 15, 2024

Hey @igorvolocRC,

We have created an internal ticket to look into this which we will be tracking as "GHC-317"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Oct 15, 2024
@Joffcom
Copy link
Member

Joffcom commented Oct 15, 2024

Hey @igorvolocRC,

Are you sure this worked in 1.55.2? I can't see any changes that would have impacted this option, I will see if I am able to reproduce this later today though.

@igorvolocRC
Copy link
Author

This is the result of a quick test. The left side is 1.55.2, and the right side is 1.62.5. The workflow and credentials are the same. As you can see, the number of returned items is different for the elasticsearch node. In the 1.62.5, the result is 600 because I set the limit; otherwise, it will take some time until it will return the hardcoded 10.000. It's definitely an issue with the elasticsearch node because the same API request with the "HTTP Request" node returns the correct number of documents in both versions.

I'll do more research, but now I have to think about downgrading because the DB has some migrations from 1.62.5 and will not start with 1.55.2.

Screenshot 2024-10-15 at 12 15 03 PM

Left side image

  • n8nVersion: 1.55.2
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.15.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

Right side image

  • n8nVersion: 1.62.5
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

@Joffcom
Copy link
Member

Joffcom commented Oct 16, 2024

That is interesting, thanks for testing. I will dig through the release notes and see if I can spot the change.

@quicpx
Copy link

quicpx commented Oct 29, 2024

Hello, +1 here.

I have just updated from 1.59.4 to 1.64.3 and facing the same issue

@Joffcom
Copy link
Member

Joffcom commented Oct 29, 2024

Hey @quicpx,

I have just popped in a fix for this, It looks like we were no longer sending the body on a GET request so I updated it to a POST and all is good. Once reviewed and merged it will be available in a future release.

@jerryhu1234
Copy link

I have just updated from 1.57.0 to 1.65.2 and facing the same issue

@janober
Copy link
Member

janober commented Dec 19, 2024

Fix got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

5 participants