Last modified: 2010-05-15 15:33:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3099, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1099 - multiple searches should be 'and' instead of 'or'
multiple searches should be 'and' instead of 'or'
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2004-12-14 14:22 UTC by Andre Engels
Modified: 2010-05-15 15:33 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Andre Engels 2004-12-14 14:22:50 UTC
When more than one word is filled in in a search, the search returns all pages
containing _any_ of those words. It sould be much more useful to get the pages
containing _all_ of those words.

(In particular on the Chinese Wikipedia, where each character is considered a
single word, I am getting the feeling one might as well switch off searching
without losing much usability...)
Comment 1 Darkoneko 2005-09-29 00:37:26 UTC
well, it would be even better if we could select "AND" or "OR" mode :)
Comment 2 Brion Vibber 2006-04-25 05:41:34 UTC
Didn't we fix this many versions ago?
Comment 3 Ben Gertzfield 2006-04-25 15:21:09 UTC
Currently with SearchMySQL4.php, all searches *are* "AND" by default; if no other operator is present, + is prepended to each word in the search.

However, there seems to be no way to select "OR" mode with the current behavior; you can't remove the + from any word, because SearchEngine.php strips all non-
alphanumeric characters from the search.

The patch attached to bug 5711 allows admins to choose "AND" or "OR" mode for the default mode of MySQL 4.x-based search.

Note You need to log in before you can comment on or make changes to this bug.