PageRenderTime 151ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/assets/sales/knowledge-base/how-to-search-effectively-in-searchcode-server.html

https://github.com/boyter/searchcode-server
HTML | 65 lines | 55 code | 10 blank | 0 comment | 0 complexity | 6910bb1d95de9475ceaa5957a198ff1b MD5 | raw file
  1. <div class="row blue-container top50">
  2. <div class="container">
  3. <a href="/"><h1><img src="/images/searchcode_logo_white.png" height="40px" /></h1></a>
  4. </div>
  5. <div class="container">
  6. <h1 class="white">How to search effectively with searchcode server</h1>
  7. </div>
  8. </div>
  9. <div class="row dark-blue-container">
  10. <div class="container">
  11. <p class="white em padtop10"><a class="btn btn-default btn-xs" href="/knowledge-base/"><span class="glyphicon glyphicon-link" aria-hidden="true"></span> Back to Knowledge Base</a></p>
  12. </div>
  13. </div>
  14. <div class="row top20">
  15. <div class="container em">
  16. <p class="em">
  17. Type any term you want to search for in the search box and press the enter key. Generally best results can be
  18. gained by searching for terms that you expect to be close to each other on the same line. Case is ignored for all searches with the exception of search operators.
  19. </p>
  20. <p class="em">
  21. The following search operators are supported.
  22. </p>
  23. <dl class="dl-horizontal">
  24. <dt>AND</dt>
  25. <dd>Match where documents contain terms on both sides of the operator. E.G. <code>test AND import</code></dd>
  26. <dt>OR</dt>
  27. <dd>Match where documents contain terms on either side of the operator. E.G. <code>test OR import</code></dd>
  28. <dt>NOT</dt>
  29. <dd>Match where documents do not contain terms on the right hand side of the operator. E.G. <code>test NOT import</code></dd>
  30. <dt>( )</dt>
  31. <dd>Group terms. Allows creation of exclusive matches. E.G. <code>(test OR import) AND other</code></dd>
  32. <dt>*</dt>
  33. <dd>Wildcard. Only applies at end of a query. E.G. <code>test*</code></dd>
  34. </dl>
  35. <p class="em">An example using all of the above would be <code>(mkdir NOT sphinx*) OR (php AND print*)</code>
  36. This will search for documents containing mkdir but not starting with sphinx or documents containing php and containing terms starting with print.
  37. Operators must be in upper case where show or they will be treated as part of the query itself. I.E. to match on documents containing <code>and</code> search for and lowercase.</p>
  38. <p class="em">
  39. Other characters are treated as part of the search itself. This means that a search for something such as <code>i++;</code> is
  40. not only a legal search it is likely to return results for most code bases.
  41. </p>
  42. <p class="em">If a search does not return the results you are expecting or no results at all consider rewriting the query.
  43. For example searching for <strong>Arrays.asList("a1", "a2", "b1", "c2", "c1")</strong> could be turned into a
  44. looser query by searching for <strong>Arrays.asList</strong> or <strong>Arrays asList</strong>. Another example would be <strong>EMAIL_ADDRESS_REGEX</strong> for
  45. <strong>email address regex</strong>.
  46. </p>
  47. <p class="em">Check out the suggested "Alternate Searches" which can appear below the number of matching results for any query. They generally will show looser match queries which can return more results and help you find what you are looking for.</p>
  48. <p class="em">To view the full file that is returned click on the name of the file, or click on any line to be taken to that line.
  49. Syntax highlighting is enabled for all files less than 1000 lines in length.
  50. </p>
  51. <div class="center">
  52. <a href="#" data-featherlight="/images/videos/searchcode_server_search.gif"><img class="img-float img-border" src="/images/videos/searchcode_server_search.gif" alt="GIF Animation showing searchcode server search capabilities" /></a>
  53. </div>
  54. </div>
  55. </div>