Advanced Search: Collect code search snippets and expected hits

Overview

It's important to establish testing first in resolving occurrences that are related to characters and searches that aren't working. Many times a change that will fix one use case will create additional issues and there needs to be a way to test against variable solutions to resolve.

I propose to use this issue to continue the discussion in #350396 (comment 814694593) and as a placeholder for code search test examples.

This issue is Blocking #346914 (closed)

Steps

  • Create a list of Test Snippets and hits
  • Create a test for the known snippets and hits in the list below.

Code snippets for the test suite (WIP)

Examples we've seen recently from our customers:

Code snippet Search term(s) for expected hit
https://s3.amazonaws.com/foo/bar/baz.png foo/bar
id("foo.bar-baz-conventions") bar-baz-conventions, baz, baz-conventions
extends: .gitlab-tests-image gitlab-tests-image, tests-image, gitlab-tests
We [plan ambitiously](#ambitious-planning). #ambitious-planning, ambitious-planning
https://test.or.dev.com/repository/maven-all https://test.or.dev.com/repository/maven-all,https://test.or.dev.com/repository, test.or.dev.com/repository/maven-all, repository/maven-all
q = "SET @@session.sql_log_bin=0;" sql_log_bin, sql_log_bin=0
uri: "v3/delData", v3/delData

Please feel free to add more examples

/cc @john-mason @ebanks @changzhengliu @JohnMcGuire

Edited by Terri Chu