# Open and search Documentation-Center

In notebooks you can press F1 (or Shift+F1 for a new window) to:

1. open the help page of the marked Symbol or the Symbol under the cursor in the Documentation Center
2. to search the Documentation Center, if no direct page was available

Question: Is it possible to achieve exactly this behavior with a function searchDoc[input_String]?

## Related issues

Related 1: As stated in the documentation to Hyperlink, this here opens the documentation of Plot in a new window

NotebookOpen["paclet:/ref/Plot"]


but if the "paclet" does not exist, an error message appears instead of a search in the docs.

Related 2: It's possible to mimic the behavior of F1 with a FrontEndToken.

Button["HEEELP!!", FrontEndExecute[FrontEndToken["SelectionHelpDialog"]]]


This button shows the help of marked symbols or of symbols under the cursor. Problem here is, that it searches always the selected expression. Maybe there exists something similar which can take an input string.

Related 3: One of the probably biggest resource of information can be found in package

\$InstallationDirectory/AddOns/Applications/DocumentationSearch


This seems to contain the functions and helpers which are actually used in the Documentation Center. See for instance what

DocumentationSearchSearchDocumentation["Graphics"]


gives.

-

The function you are looking for is DocumentationHelpLookup["some input"]. This is the function that is executed when you hit F1 (after the front end figures out what is under the cursor).