Skip to content

Implement Search After based on refactored scroll-chan#52

Open
axel-angel wants to merge 5 commits into
mpenet:masterfrom
finity-ai:feature-search-after-scroll
Open

Implement Search After based on refactored scroll-chan#52
axel-angel wants to merge 5 commits into
mpenet:masterfrom
finity-ai:feature-search-after-scroll

Conversation

@axel-angel

Copy link
Copy Markdown
Contributor

We noticed some performance issue because we're solely using ES scroll to retrieve pages of results of our queries for "real-time" requests, however it's strongly discouraged in the doc. Here we opt to implement Search After which is very close to scroll-chan, the difference is the necessity to have a proper ordering through :sort

Note that this PR refactored and simplified scroll-chan plus we fixed a possible bug: we always pick the last scroll, acquired from the last page, which wasn't the case before. As described in the doc, we should always use the lastest scroll.

Other note, We noticed that chan->seq doesn't properly close the chan when the seq isn't entirely consumed. We also simplified it using simple clojure functions. This issue was already here and no idea how to fix it yet :/ Any idea welcomed.

@axel-angel

Copy link
Copy Markdown
Contributor Author

@mpenet Can you take a look and opinion on this?

@axel-angel axel-angel force-pushed the feature-search-after-scroll branch from 7adf2df to 8cd2f2f Compare April 6, 2020 17:11
@axel-angel

Copy link
Copy Markdown
Contributor Author

@mpenet I've revised and made new tests. Can you take a look for merging this? thank you

Comment thread test/qbits/spandex/test/core_test.clj Outdated
Also ensure we cleanup the testing index when the tests finished
@axel-angel axel-angel force-pushed the feature-search-after-scroll branch from 8cd2f2f to 9ebd2cb Compare April 7, 2020 07:19
@mpenet

mpenet commented Apr 7, 2020

Copy link
Copy Markdown
Owner

Hi,
I somehow didn't get any notification, I will have a look at it once I have a bit of free time, probably this week-end.

@axel-angel

Copy link
Copy Markdown
Contributor Author

Hi Max, no problem. Keep me updated or ping me if you need. Thanks.

@rborer

rborer commented Apr 30, 2020

Copy link
Copy Markdown
Collaborator

@mpenet FYI we've been running with this patch in prod since a few days & it's working fine.

@rborer

rborer commented Apr 16, 2021

Copy link
Copy Markdown
Collaborator

👋 😉

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.

3 participants