Allow wildcards like * in search

Created on 10 June 2009, almost 16 years ago
Updated 16 April 2025, 29 days ago

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:

✨ Partial Search in Drupal Core Needs work - 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.

✨ Allow users to use advanced search without keywords entered Postponed: needs info - 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".

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

search.module

Created by

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    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!

Production build 0.71.5 2024