-
Notifications
You must be signed in to change notification settings - Fork 834
Instant Search: Implement minimal search results and spelling correction #13365
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
Instant Search: Implement minimal search results and spelling correction #13365
Conversation
Co-Authored-By: Jeremy Herve <jeremy@jeremy.hu>
aggregations: aggs, | ||
filter: filter, | ||
}; | ||
return fetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we handle failed API requests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Probably depends on what the error code was. Let's deal with it in #13366
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy for us to merge this into the feature branch as a work-in-progress. Let's make sure we go back and address feedback from the original PR #13313 later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* Implement minimal search results and spelling correction (#13365) * Add filtering display (#13371) * Fix search result display bugs and make improvements (#13393) * Add rudimentary support for filtering on post types (#13430) * Add support for filtering on categories and tags (#13505) * Add instant search sorting based on the URL (#13377) * Add support for filtering on dates (#13545) * Add custom taxonomy filtering (#13605) * add sort widget (#13614) * fix many theme incompatibilities (#13602) * Add infinite scrolling (#13684) * Add caching to the api requests (#13714) * Clean up some design bugs/issues (#13721) * Fix labels for post types when we have them. (#13750) * Add localization and formatting of all dates (#13748) * search from any page on the site (#13713) * Hook up default options (inc. sort) (#13742) * Add TrainTracks analytics (#13730) * Create PostTypeIcon component (#13790) * Upgrade to Preact 10 (#13794) * Add comments component (#13797) * Address review feedback
This is the same as #13313 but merging into instant-search-master rather than master.
Changes proposed in this Pull Request:
Implementing the minimal search results mockup from p3QzjZ-VL-p2
There will be three different types of search results:
But this is just focusing on the first one and setting us up for the other two.
This PR also implements the logic for corrected search queries when we do any spelling correction and displaying the total number of results. Here is what it all looks like:
Instant Search remains gated by a
JETPACK_SEARCH_PROTOTYPE
define.Is this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
define( "JETPACK_SEARCH_PROTOTYPE", true );
to your wp-config.php./?s=privacy
.You can also follow the instructions in #13290 to run your query against any site rather than the site you deploy the code on (all the data comes from the API).
Proposed changelog entry for your changes: