Problem/Motivation
An often-requested feature for Core Node Search is to be able to use wildcards like * in search keywords. For instance, you might want to search for just * (with some advanced search filters), or search for *word* to find words containing "word" somewhere inside them, or search for foo*bar to find words that start with foo and end with bar.
Note these somewhat related issues:
#103548: Partial Search in Drupal Core - for "fuzzy" searches - this would mean that the search index would be greatly expanded to contain 3-letter chunks of each word instead of just the bare words. So in this case if you searched for "word" you would get words containing "word" somewhere inside them. But it doesn't take care of cases like foo*bar or advanced searches without a keyword.
#1126688: Allow users to use advanced search without keywords entered - this would take care of the ability to use Advanced search filters without entering a keyword, in Node searches. But it doesn't take care of the possibility of searching for *word* or foo*bar.
Proposed resolution
Add wildcard ability to keyword searches for content. And maybe for users as well?
Remaining tasks
Patch and test needed.
User interface changes
Users would be able to search content (and maybe users?) using wildcards.
API changes
The API related to search queries would expand to allow * in the keywords.
Original report by ismigar
This patch allow to search content without specificate keyworks and with * symbol. For exemple you can search for every node that tpe is page "* type:page".
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | search_wildcard-487764-3.patch | 1.24 KB | superspring |
| patch.diff | 8.41 KB | ismigar |
Comments
Comment #1
pwolanin commentedFeature are only accepted into HEAD, and patches must be in unified diff format.
Comment #2
jhodgdonFeatures are now Drupal 8 territory. Adding to the list...
Comment #3
superspring commentedThis patch starts off the idea for D8 by allowing characters such as '*' through the filters.
Comment #4
ianthomas_ukDuplicate of #1126688: Allow users to use advanced search without keywords entered
Comment #5
jhodgdonUm. I don't think this is a duplicate of that other issue. This is a feature request for letting people search with wildcards, like searches for "walk*" finding walk, walks, walking, etc. That other issue is something else.
Comment #6
ianthomas_ukThat's not what I understand from the issue summary, because the example given looks for all content of type page, whatever content they contain.
The issue you're describing would be #103548: Partial Search in Drupal Core
Comment #7
jhodgdonThe example says you want to be able to search for "*" in addition to some advanced search parameters, and by extension presumably things like walk*. That is not the same as either of the referenced issues.
Comment #8
jhodgdonAdded an issue summary
Comment #9
johhan commentedThis thread was broaden by adding another thread to it:
https://drupal.org/comment/8314539#comment-8314539
(by tagging that as duplicate of this)
So in comments, please, take in mind, that the requested feature is: the possibility to switch on the full text search, in the drupal core!
"Wildcard" search is only one implementation of syntax of user query - it may be done in diferent ways, of course.
(as I think, we do not need regular expressions searches in the core, only some more mature way of searching, that e.g. Drupal7 have)
Comment #10
jhodgdonSince 8.0.x-beta1 has been released, our policy at this point is No feature requests until 8.1.x. See #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?. Sorry, it's just too late for 8.0.x at this point, so even if we had a viable patch, the core committers would not commit it.
Comment #26
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #27
smustgrave commentedSince there's been no follow up, going to close this one out. If still a desired feature please reopen
Thanks all!