The Global Admin Search is the features as plugin of WordPress which is currently under development. The Global admin Search is one of the most important tool that should be included in the WordPress core. Considering the extensive use of WordPress by the web community, Global Admin Search makes up a powerful tool to search through all contents at once which saves a lot of time and also improves the user experience of WordPress. The basic spine of the Global Admin Search has already been made I’m suggesting the following improvements that I’ll do in the Global Admin Search as my GSoC project.
Currently there are a lot of search forms in the admin area, Different search forms for pages, posts, media and plugins. It has been particularly listed in the make WordPress thread for global search that having a global admin search page for WordPress is much better and much more preferred by a user.
- Unifying all the search forms can be done by changing the action parameters of each search form in such a way that these form also follow the same search mechanism as the Global Admin Search. Hence, if the user uses any of the search forms present in the admin area he/she will be automatically directed to the global admin search page, which will display all the posts containing that particular search term.
- The above changes can be directly made to the WordPress core when (if) the Global Admin Search becomes the part of the WordPress core. As in the current case it’s just a plugin we can add a JS code to change the parameters of these forms dynamically so that they follow the same mechanism as the Global Admin Search. In this way as long as the plugin is activated we can unify all the search forms. These will revert to their original mechanism as soon as the plugin is deactivated thus providing a user preferred search for all the search forms.
The current Global Admin Search displays everything in a single page separated by tables without any indications as to where the search term is present in the displayed post. This is a bad approach as even if a particular post is displayed the user has to open each post to know about that particular post. Also as suggested in the history of omnisearch thread using a tabbed interface is much more user friendly.
- Provide a Global Search Page with a tabbed interface having various tabs such as (Posts, Pages, Comments, Media, and Plugins). The tabbed interface would be similar to the interface Gmail uses nowadays. Each tab will have a title (Posts, page etc.) along with the number of posts found for the particular Post type. For doing this will use the JQuery UI’s tabs implementation for making the tabs that asynchronously load the posts. (Backbone JS can also be used if in case the JQuery UI doesn’t work out well). As far as I can see, it would require an additional CSS file along with a JS file that will be included so as to divide the contents and show the in tabs.
- Under the title of each post/page/comment we can show the part of the content having that particular search term. The part of the content of the post that will be displayed will have the following structure:… (Some variable number of characters) highlighted search term (some variable number of characters)… Here I have been thinking of making variable number of characters 50. Could be changed later.
- Can use a child class of class-wp-list-table and class-wp-posts-list-table so that they return the post content or a part of post content too. We could make direct changes to the core if the plugin becomes a part. Until then I would suggest creating a child class with code for the above ideas and including it with the plugin.
As is the current standard with the search engines and search plugins, a search uses Ajaxified approach towards suggestions. To make it faster and much user friendly I think it would be better to make the showing suggestions and searching alongwith mechanism asynchronous. There are two approaches, either showing suggestions as menu items so that a user can select from the given search terms. These search terms will be based on the substring already typed as well as its occurrence in the frequency of its occurrence in posts (weighted search results) or else we can simply display the entire results in tabbed format based on the substring already typed asynchronously. I prefer the latter approach or perhaps we could implement both the approaches, something like the way google search suggestion displays the results.
- Could be done using an asynchronous get request. Integrating it with the tabbed content or the suggestion menu should also be easy. It may require some additional code that searches in parallel for the weighted response of the substring to show as suggestions. This would not only make user search experience faster and easier but would also reduce the user’s possibility of hitting dead ends greatly. As the suggestions would prevent the users in typing complex queries for which they might hit a dead end (no results page).
While searching for menu contents it becomes difficult for the user to know where each particular menu items is. We could probably index all menu items and display links as suggestions (similar to WP-Butler plugin) for particular keywords.
- We could make a structure whenever the user focuses on the search present in the admin panel and could search some keywords matching them to the menu items and displaying them as suggestions. There would be separate filters for searching menu contents and posts. While showing suggestions we could separate these two elements (the suggestions for the content in posts and the suggestions for the menu items). This way the Global Admin Search would not only simplify the tasks of content searching but would be great help for the users in finding menu items.
- The approach would probably require me to write a new plugin code from the scratch (would be used just for menu search purposes) and then I would use hooks to add this new plugin to the Global Admin Search so as to provide proper modularity to it.
- Introducing the admin bar search in the backend too.(Its currently in the front end only). Would make the search similar to the way Global Admin Search plugin is currently.
- Adding a keyboard shortcut for Global Admin Search. It would require an additional JS code. Would provide proper functions so that user can change the shortcuts if needed.
- Including a codex search using the wiki API. Could use the media wiki api for this. Currently going through the api documentation.