How to refine search for multiple words?
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.
2 answers
You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.
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.
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 wordsnake
oroil
.
- 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 phrasesnake oil
.
- keyword search (plus symbol)
If you search for
+snake +oil
, Codidact will find all posts that contain both the wordssnake
andoil
.
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 comment threads