This was one of the very bright goals of D7UX (Drupal 7 User Experience initiative, http://www.flickr.com/photos/mboulton/3569318373/sizes/z/in/pool-903403@N22/) was in fact brought up as part of out D8MI (Drupal 8 Multilingual Initiative), that our lack of search options on the node page is a big usability blow. We are trying to map feature sets of content/configuration/interface translation together, but just having a search box on the node admin listing page would be such a widely acceptable general improvement that I hope its hard to say no to the idea :)

For the implementation, I assume the hard part is to combine the keyword search with all the other options (and sort the results by tablesort). Advanced search does have some of those filters, but not all of them. I'm not at all an expert in that codebase. Can we estimate how hard can it be to implement this (add a search box on the node admin listing page and make it work in combination with the other filters)?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David Lesieur’s picture

An additional challenge would be to implement this in a generic way so that the core search can be replaced with another engine. Sites using Solr, for example, usually don't bother updating the core search index, and keyword search won't work without the index.

Gábor Hojtsy’s picture

Looked into this a bit. As it is implemented, it seems to be work to do with http://api.drupal.org/api/drupal/modules--node--node.module/function/nod..., so it understands some of the properties we want to look at, like filter by stickiness or translation status.

And then a "bridge function" like http://api.drupal.org/api/drupal/modules--node--node.module/function/nod... and http://api.drupal.org/api/drupal/modules--node--node.module/function/nod... to put it int he right format for the search.

Finally I thought that might be a problem that search module indexes published nodes only, but that does not seem to be the case by looking at http://api.drupal.org/api/drupal/modules--node--node.module/function/nod... which provides the nodes to index. So it looks like really a baked-in condition on the node search form part. To allow that to be overridden, we'll need to put some permission checks in place.

lelizondo’s picture

Now that you mention it, it would help to do something similar with the user list page. But I know this is another issue, it just came to my mind right now. Sorry, won't happen again.

Bojhan’s picture

Gábor Hojtsy’s picture

@Bojhan: not sure its duplicate, that issue seems to (a) want to cover all entities, which the search module does not support (b) does not even use search module but want to introduce custom title search features for nodes instead. I don't think that approach has a good chance of getting in since it duplicates functionality in very custom ways. Commented on http://drupal.org/node/497804#comment-4992504

David Lesieur’s picture

Gábor also reminds me that search module also indexes comments, and that false search positives caused by comments are not desirable here.

David Lesieur’s picture

Gábor Hojtsy’s picture

Issue tags: +language-content

Tagging for the content handling leg of D8MI.

yoroy’s picture

Priority: Normal » Major
Status: Closed (duplicate) » Active

If generic entity search ( #497804: [meta] Search entities (nodes, terms, etc.) within the administrative interface ) overly complicates this, then by all means lets do the node-specific admin search as a stand-alone issue. Major because, well, a CMS should let you find your content. (Alternatively we rename 'Find content' to 'Browse content' ;-)

klonos’s picture

yoroy’s picture

I know I'm probably over-simplefying, but there is search functionality in core, can't we apply that to the node listing? Searching comments is not that big an issue imo. In the larger scheme of things, how many of your content types have comments enabled? How bad are false positives compared to the zero positives we get now because of the absence of any search capability?

klonos’s picture

I really think we should try to have as much consistency in D8. To that end, perhaps we should seriously consider implementing this based on #1475204: [META] Provide a generic search/filter UI interface pattern for listing pages. Over in that issue, I proposed to consider something like Instant Filter as a re-usable filtering/searching mechanism across various admin pages.

Gábor Hojtsy’s picture

@klonos: I think the utility of that is pretty limited given it can only work off of data already displayed on the page.

yoroy’s picture

Yes, this search is different in that it lives on a page where there is very likely a pager. The search here should be able to look beyond what's on the first page. The consistency would be in that this similar functionality would be found in the same place on the page as filters on other pages.

klonos’s picture

Yep, fair enough. Thanx to both for clearing things up.

jhodgdon’s picture

A few thoughts:
- Since nearly all of the text in nodes is in fields (aside from the title, which maybe is a field by now too?), the only practical way to have keyword searching is to use something like the Search module, which renders all the fields (plus the comments, as noted above), and then reduces the whole thing to plain text, which it adds to an index.
- Node indexing happens during cron runs, so filtering via search keywords is not always going to get the latest content.
- Keyword matching in search only works with exact keywords by default. But if someone has a module like Porter Stemmer installed (which allows matching of keywords like walking, walks, walked in English), the keywords stored in the Search database are "stemmed". (This works via hook_search_preprocess() in general.) So, you'd need to be careful when implementing this node admin filter to make sure to do the same preprocessing that regular node searching is doing: you need to preprocess any entered keywords before the database query is built, not just blindly try to use the Search module database tables. It would be prudent, if this feature is implemented, to add a test to make sure it works with a pre-processing module enabled.
- Obviously this filter will not work without the Search module enabled, and without node searching/indexing enabled within the Search module (in 7.x and later, you can turn off user and node searching independently from the Search admin settings page, while still having the Search module itself enabled).

Given all of that, it might make sense to make this happen via a hook that lets modules add filters to the content admin form, and to have the Search module implement this hook -- that would be a flexible way to solve the problem... This hook would presumably be invoked from node_filters(), and some kind of callback would need to be done during node_build_filter_query() to let the implementing module add the right stuff to the query.

If you don't want to use the Search module, the only other real option, which was proposed on another issue, is to limit the search to the Title only.

Gábor Hojtsy’s picture

Issue tags: -Usability, -D8MI, -language-content +redesign usability issue

Entity language is now implemented with search module, thanks to #1669876: Add missing language functionality in search module. We don't have resources for this with D8MI people, so moving off our tagging.

Gábor Hojtsy’s picture

Issue tags: -redesign usability issue +Usability
webchick’s picture

Aw, too bad. :\ The lack of search on that page makes me has a sad, and it seems like it'd be a lovely patch for a "not quite novice."

Bojhan’s picture

Version: 8.x-dev » 9.x-dev

Really sad having to do this, almost unbelievable we are a CMS that does not allow such a basic function for its content creators (would probally be 2nd on their list after WYSIWYG) . Anyway the work required and the lack of progress, makes this Drupal 9 material.
:(

webchick’s picture

Version: 9.x-dev » 8.x-dev
Category: feature » task
Status: Active » Postponed

I actually don't think this is feature freeze-bound material, personally. With views in core now, I think this is something we could do along with converting admin/content to a view. Moving back to 8.x, but marking postponed on #1895160: Convert admin/content to a View, keep a non-views fallback with no bulk operations.

Gábor Hojtsy’s picture

Agreed with @webchick, if the node admin page turns to a view, we could get a basic version of this for free with an exposed search box on title or body.

catch’s picture

Priority: Major » Normal
Status: Postponed » Active

That's in now. I don't see any reason this couldn't go in right up to and including backporting from Drupal 9, but it's also not something that should block other refactoring.

jhodgdon’s picture

Component: search.module » node.module

This is about a Node module admin page. Not part of the Search module.

webchick’s picture

Priority: Normal » Major
Issue summary: View changes

This still represents a major UX win, IMO. Restoring status, which I think was demoted back when majors were blocking features.

Also, that page is a view now. :) Who wants to tackle this?

webchick’s picture

Issue tags: +Novice

Possibly? Maybe?

xjm’s picture

Component: node.module » node system

(Merging "node system" and "node.module" components for 8.x; disregard.)

dawehner’s picture

I am 100% sure that we have another issue doing the same already.

Gábor Hojtsy’s picture

#497804: [meta] Search entities (nodes, terms, etc.) within the administrative interface has designs also. Should we close this as duplicate, or that one or neither? :) (Eg. make that a META) This is at least a well focused issue that can be implemented with views.

wiifm’s picture

Status: Active » Needs review
FileSize
22.9 KB
24.75 KB
2.81 KB

So I made a quick patch so you can see this in action. I found it really confusing at first as the exposed checkbox was not working, applying the patch found in #2130205: Unable to "Expose this filter to visitors, to allow them to change it" fixed that up.

Attached is a patch that will alter the default content view, adding in an additional exposed filter for 'Title', using the operator 'contains'.

Screenshot with the new view:

admin listing screen

And showing the filter in action:

admin listing screen with filter

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +VDC

This looks great!

webchick’s picture

Title: Add search feature on the node listing admin page » Add title search feature on the node listing admin page
Status: Reviewed & tested by the community » Fixed

AWESOME!! This makes me SO HAPPYYYYYYYY!! :D

So this is not quite the general keyword search referenced in the OP, as it's limited to titles only. However, by limiting it to title only, we deftly avoid all of the various challenges around exposing search module's stuff here (searching before words are indexed, requiring search module to use this page, etc.), and these issues have postponed this initiative for a number of years at this point. :\

Also, there's plenty of time before Drupal 8.0.0 lands, so when/if #1853536: Reintroduce Views integration for search.module (not supporting backlinks view) lands, we could always look at upgrading this to a general keyword search, as well (really, that could happen in any feature release of D8).

Committed and pushed to 8.x. Great work, wiifm! :)

tim.plunkett’s picture

dawehner’s picture

@tim.plunkett
Come on, the other issue haven't moved since a half year.

irinaz’s picture

Please include ability to filter by title. This feature is CRITICAL for content managers. For years we had to add additional view on each drupal installation (both D6 and D7) to provide users with what they consider basic search
admin view

klonos’s picture

@irinaz: no need to be frustrated without reason or to be posting the same request over multiple issues. The feature to search by title was added already. Take a look at the screenshots at #31 above or take D8 for a test spin here to see live for yourself: http://simplytest.me/project/drupal/8.x

irinaz’s picture

@klonos - thanks for pointing me to the right direction. Sorry if I sounded frustrated - I did not mean it. I will run a new test this or next week. There were also big issues with the layout and "reset" button - I will submit my comments after testing.
Thanks again!

webchick’s picture

Please open another issue for any follow-up things to be done and cross-link it here. This issue is fixed.

irinaz’s picture

Thanks, will do.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.