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".

CommentFileSizeAuthor
#3 search_wildcard-487764-3.patch1.24 KBsuperspring
patch.diff8.41 KBismigar

Comments

pwolanin’s picture

Version: 6.10 » 7.x-dev
Status: Active » Needs work

Feature are only accepted into HEAD, and patches must be in unified diff format.

jhodgdon’s picture

Title: patch to module search » Allow wildcards like * in search
Version: 7.x-dev » 8.x-dev

Features are now Drupal 8 territory. Adding to the list...

superspring’s picture

StatusFileSize
new1.24 KB

This patch starts off the idea for D8 by allowing characters such as '*' through the filters.

ianthomas_uk’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)
jhodgdon’s picture

Status: Closed (duplicate) » Needs work

Um. 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.

ianthomas_uk’s picture

That'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

jhodgdon’s picture

The 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.

jhodgdon’s picture

Issue summary: View changes

Added an issue summary

johhan’s picture

This 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)

jhodgdon’s picture

Version: 8.0.x-dev » 8.1.x-dev

Since 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.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +stale-issue-cleanup

Thank 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!

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Since there's been no follow up, going to close this one out. If still a desired feature please reopen

Thanks all!