5

I just discovered that a self answered question I wrote got deleted by a mod. The question I am referring to is: Why don't I find any expected results when google-searching with search terms that start with dashes?

I solicited discussion on meta.stackexchange about where and how to ask this question before posting it anywhere. You can find that meta discussion here: Where can/should I ask a question about how to google for command-line arguments that start with a dash?.

I wrote this question and its self-answer to help other people with I problem that I personally faced.

I'd like to understand why this question and its self-answer were deleted. Unless I missed it somehow, I did not get any explanation from the user who deleted this post about why it was deleted.

  • Is the question off-topic here? Why was it deleted and not just closed then?
  • Was the question and its answer of unsalvageably low quality?

The deleted contents are as follows:

Question

Background: When I try to google search something like "gcc -Wall" (for example,) to find documentation on the -Wall flag's meaning for GCC, it looks like I get the same search results as if I just searched "gcc": None of the results seem to include the text "-Wall" in them.

Why doesn't a search query with search terms starting with dashes seem to work as I intend (return results containing matches of the terms that starts with a dash), and how can I properly query for terms that start with a dash?

Note: Related, but not a duplicate (because it is more general, and the answer is binary-different as a result): How do I escape Google functional characters?.

Answer

gcc -Wall actually tells the Google search engine to include things that match "gcc", and exclude things that match "Wall". This is because the dash/hyphen character, "-", is one of several special characters called "search operators" for the Google search engine.

If you go to "How to search on Google", it links to a page about search operators that documents the various search operators and how they work. For this particular one, if you start a term with a dash/hyphen, it will tell the Google search engine to exclude that term from the search. Quoting from the current user documentation:

Exclude words from your search
Put - in front of a word you want to leave out. For example, jaguar speed -car

To properly search for pages with matches of search terms that start with a dash/hyphen, use the "exact match" operator: enclose/wrap the term that starts with dashes with double quotes (including the dash/hyphen), like "gcc "-Wall"".

The "exact match" operator does what its name suggests: It is used to search for exact matches, and can be used to treat the dash/hyphen as part of the search term for which to find an exact match. Quoting from the current user documentation:

Search for an exact match
Put a word or phrase inside quotes. For example, "tallest building".

2
  • 1
    IIRC at the time that I reviewed it look as spam... I not sure if someone flagged but certainly I saw it at the time of reviewing other posts that were veiled attempts to hide spammy links. While I regularly participate in [site-recommendation] post in Meta SE I wasn't aware of the discussion about this one. I just undelete question and answer. I'm sorry for my error. Commented Feb 26, 2023 at 19:46
  • hm. what about this question makes it look like a veiled attempt to hide spam? Is it that the answer has a URL that contains "support"? (support.google.com/websearch). no worries. thanks for responding. could you write that up as an answer so I can accept it and this Q&A be resolved?
    – starball
    Commented Feb 26, 2023 at 19:48

1 Answer 1

3

As mentioned in the comments to the question this was my mistake. Question and answer were undeleted.


I will take this opportunity make a call to use the corresponding proper channel for disputing an action done by a diamond moderator

  1. Cast a reopen vote

    For closed questions, first fix the question problem. If it's unclear and there were no comments, when the moderator username is visible add a @mention (use the moderator name instead of mentin) asking for clarification about what should be fixed or the close reason.

  2. Flag for moderator attention

    In cases like this, the moderator who did the action is the most appropiate person to review the case on first instance.
    Please follow the guidance provided in the flag modal: "Be specific and detailed!". In this case the body of the question might exceed the number of characters, including the question and answer content is not necessary as the moderators are able to see deleted posts.
    In case that you want that a different moderator review the case, mention that in the box, mention the reason as well why do you think that the action done by the first moderator should be reverted.

  3. Post a question in Meta Web Applications (this site)

    This channel is appropriate when the input of other community members might help in having a constructive conversation, i.e. when a site guideline might be better understood by having multiple point of views.

  4. Contact Form

    Use this channel when it's necessary the intervention of a Community Manager or Support agent (a Stack Overflow employee). Some situations like merging multiple accounts can only be managed by Stack Overflow employees.

2
  • is option 1 just for closed questions that aren't deleted?
    – starball
    Commented Feb 26, 2023 at 22:54
  • 1
    IIRC questions deleted by moderators can't be undeleted / cast votes to reopen by users. A bit later I will add links to respective FAQ from Meta Stack Exchange. Commented Feb 26, 2023 at 22:59

You must log in to answer this question.

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