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

Use raw field for post name in adapter #8

Merged

Conversation

t-wright
Copy link

Description

Similarly to #7, this changes the VIP Search adapter to use post_name.raw rather than post_name.

Testing

  1. Add to themes functions.php:
add_action( 'pre_get_posts', function( $q ) { 
    $q->set( 'es', true );
    $q->set( 'orderby', 'post_name' );
} );
  1. Visit http://vip-go-dev.lndo.site/wp-admin/edit.php or equivalent.
  2. You will get no results and an Elasticsearch error.
  3. Apply PR.
  4. Visit http://vip-go-dev.lndo.site/wp-admin/edit.php or equivalent.
  5. It will load as you'd expect.

@pschoffer
Copy link

I have tested this on my Sandbox, it works as described!

Copy link

@pschoffer pschoffer left a comment

Choose a reason for hiding this comment

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

Looks great

@brandon-m-skinner brandon-m-skinner merged commit 7f661cf into master Sep 21, 2020
@brandon-m-skinner brandon-m-skinner deleted the t-wright/use-raw-field-for-post-name-in-adapter branch September 21, 2020 16:30
@brandon-m-skinner
Copy link

r1167-stacks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants