Skip to content

Fix incorrect references to $query_args['search']#1819

Closed
benknight wants to merge 1 commit into
wp-graphql:developfrom
benknight:patch-1
Closed

Fix incorrect references to $query_args['search']#1819
benknight wants to merge 1 commit into
wp-graphql:developfrom
benknight:patch-1

Conversation

@benknight

Copy link
Copy Markdown

Fixes #1818

This breaks search results with pagination.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.04%) to 79.987% when pulling 48af59e on benknight:patch-1 into cc0b383 on wp-graphql:develop.

@jasonbahl

Copy link
Copy Markdown
Collaborator

Oh nice!

@benknight do you have interest in writing a test for this case to make sure we don't have a regression like this again?

@benknight

benknight commented Mar 25, 2021

Copy link
Copy Markdown
Author

@jasonbahl actually while this change does fix a bug I'm not sure I would recommend merging it, because it's arguably likely to break search for a number of users -- basically in the current form, cursor pagination is broken, but search results are still (mostly) in order of relevance, especially for a single large query / when grabbing the first page. Merging this would cause search results to be ALL posts where the query "LIKE" matches the post title or post content, in a straight-up chronological order. The decision comes down to what is better - broken pagination or broken relevance.

@jasonbahl

Copy link
Copy Markdown
Collaborator

@benknight ok, ya, I think we need to get both working.

I think the codebase is in a better spot now to support both.

I'll see what I can work up!

@stale

stale Bot commented Aug 2, 2022

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Aug 2, 2022
@stale

stale Bot commented Sep 1, 2022

Copy link
Copy Markdown

This issue has been automatically closed because it has not had recent activity. If you believe this issue is still valid, please open a new issue and mark this as a related issue.

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.

Cursor pagination doesn't work with search queries

3 participants