4

I'd like to create a search for multiple terms that all fall under one tag. I tried

[c] "parameter" or "argument"

With the intent of searching for c questions with either "parameter" or "argument" in them (for example).

I read over this page, which notes that you can search for multiple tags using:

[tag1] or [tag2]

This doesn't seem to work for terms though. If I search for the first try I mentioned at the top, it seems to basically do a search for

[c] parameter or argument

Where all the terms (including "or") are required to show up in the results; which isn't what I want.

Is there a way to search for multiple terms under one required tag? Ideally, I'd like to have a search that allows for multiple (5+ terms) to search for.

  • 1
    Sounds like a SEDE query. Not typical of a keyword search field to provide "or" functionality as its purpose is generally to narrow focus. You may have luck with something like that using Google's search filtered to this site. Would be pleasantly surprised if shown otherwise. – RageFoxx Mar 24 at 18:41
  • @RageFoxx Unfortunately, SEDE isn't updated often enough to be useful. I'm just curious about monitoring something over the course of a couple days. – Carcigenicate Mar 24 at 19:28
-3

I think I found a glitchy work around. I feel like it need more QA. You can wrap every word in [tags] or "" to get your searches to work.

Syntax:

[tag] or "word" or "word"

[c] or [r] or "how":

https://stackoverflow.com/search?q=%5Bc%5D+or+%5Br%5D+or+%22how%22

[c] or "parameter" or "argument"

https://stackoverflow.com/search?q=%5Bc%5D+or++%22parameter%22+or+%22argument%22 [c] "parameter" or "argument" and "printf" https://stackoverflow.com/search?q=%5Bc%5D+%22parameter%22+or+%22argument%22+and+%22printf%22

P.S. I am now really curious what SE code or software that stack exchange uses. P.P.S. Google actually fails typically for "or" or "and" searches these days which is why I use R seek as my default search stack exchange.

|improve this answer|||||
  • 1
    Unfortunately, those don't seem to work. Those all seem to be essentially "and" searches, except for multiple tags. – Carcigenicate Mar 24 at 19:11
  • Well I did say it was glitchy and its not a permanent solution. Let me elaborate... 1) The problem allows for 1 nested "or" query for text and 1 nested "or" query. 2) Actually I am getting "or" search for parameter and argument but only for that limited example. My worry is that between different browser versions people might get different results. 3) The problem is the sorting of results – pierround Mar 24 at 19:35
  • This does not work, in fact it is no different to what the question says the OP tried. See the advanced search tips to see what this is actually doing here: meta.stackexchange.com/help/searching – Mark Kirby Mar 24 at 19:36
  • Mark it is different 1) I would actually take a look at the different searches before you pass judgement and consider 2) I mentioned it being glitchy for a reason, in that it very clear to me that I am getting different results from both you and OP. 3) I honestly you page you linked to does not mentioned nesting of search parameters (which is actual problem) nor does it help define how stackoverflow does search (from a programming perspective). – pierround Mar 24 at 19:46
  • 1
    It is not glitchy, if you search for [c] or "argument" or "peram" you get a search for the tag c the phrase "argument" the word "or" and the phrase "peram" that is expected behaviour. "honestly you page you linked to does not mentioned nesting of search parameters" yes it does and the "or" only works for tags, you cannot search for one phrase or another, that is the whole point of the question. – Mark Kirby Mar 24 at 19:50
  • Mark, Are you so focused on arguing a point that you won't see evidence to the contrary? I said I am going to post more examples and that what I intend to do. – pierround Mar 24 at 20:00
  • Let look at <<[c] or [python] "parameter" or "argument">>: stackoverflow.com/… – pierround Mar 24 at 20:07
  • You get the following results: stackoverflow.com/questions/1041866/… stackoverflow.com/questions/100003/… stackoverflow.com/questions/4264127/… You notice for this double tag that it cobmines python [parameter] or python [argument] or [c] [parameter] or [c] [argument]. Which is what is wanted in OP but with two tags. – pierround Mar 24 at 20:07
  • Now let look back at the search that you say is "exactly the same": stackoverflow.com/… What I get that [100003],[1041866],[4264127] are all search on that page, but the difference being that are not on the first result. The key point: [1041866] is a search with argument and parameter [4264127] is a search with argument [100003] is a result with parameter So the from my perspective a search with is getting a "search for multiple terms under one required tag" but not necessarily in the way you want it. – pierround Mar 24 at 20:34
  • Because [426..] has the python in it here are other example for "argument" that I check to see if they were in both searches (# 2: stackoverflow.com/… and # 1: stackoverflow.com/… stackoverflow.com/questions/38561/… stackoverflow.com/questions/605845/… stackoverflow.com/questions/1041866/… – pierround Mar 24 at 20:57
  • Please stop @pierround. The result sets that you get are defined just above the search bar. In your most recent example, that would be: Results for or or "parameter" "argument" tagged with c - Which shows that the results it returned contained the keywords 'or', 'parameter', and 'argument'. You can remove the first or and see the results return the same. If you remove the second or you can see you have more results because it is no longer looking for the keyword 'or': Results for "parameter" "argument" tagged with c – RageFoxx Mar 24 at 20:58
  • The only time the boolean operator is applied is on tags, likely through a check of the bracket characters. As the OP wants keyword or operations, that is not applicable. It is not likely a current function, and your method ends up including all the keywords searched, per tag. You can go to any of those answers and you will not find one example where all three keywords (because you used or, it is a keyword) are not present. The OP wants to be able to look for posts that either contain one of the keywords, or both - Not just both + 'or'. – RageFoxx Mar 24 at 21:03
  • @RageFoxx I was getting to that. The inclusion or exclusion of "or" is a separate issue that deals with stop words. – pierround Mar 24 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .