Notifications
Sign Up Sign In
Meta

How to refine search for multiple words?

+4
−0

How to refine search for multiple words?

If I search 'Rain' I get 30 groups of answers. https://outdoors.codidact.com/posts/search?utf8=%E2%9C%93&search=rain

If I search 'Rain gear' I get 75 groups of answers. https://outdoors.codidact.com/posts/search?utf8=%E2%9C%93&search=rain+gear

The advanced search options say

Advanced Search Options

To further refine your search, you can use additional qualifiers such as core:>1. For example, the search score:>=2 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 2 and were created less than a year ago.

Why should this post be closed?

0 comments

2 answers

+4
−0

The technical details of how search works are in the MySQL manual, which includes a full list of operators. The short version: we use a MySQL FULLTEXT index for search, which gets us some useful things for free.

How you express your search depends on exactly what you're searching for. You could search for +rain +gear, which would match posts that include both words (but not necessarily together), or you could search for "rain gear", which would match posts that contain that phrase exactly.

2 comments

Can we add a link to it in the search screen? James Jenkins 15 days ago

We'll get a help article written for it, @JamesJenkins - the technical manual isn't exactly the ideal user guide :) ArtOfCode 15 days ago

+2
−0

There's now a help center article available at /help/search that has some guidance on how to refine your searches.

To quote from the relevant section:

  • plain search

If you put the text snake oil into the searchbox, Codidact will find all posts that contain either the word snake or oil.

  • exact search (quote marks)

If you include quote marks around your search term, such as "snake oil", Codidact will find all posts that contain exactly the phrase snake oil.

  • keyword search (plus symbol)

If you search for +snake +oil, Codidact will find all posts that contain both the words snake and oil.

In your situation, simply replace "snake" and "oil" with "rain" and "gear" to filter the results however you like. (There are more options detailed in the help center article, as well.)

0 comments