Skip to content

search: suggest the correct search pattern type

Warren Gifford requested to merge rvt/search-alert-with-search-type into master

Created by: rvantonder

Before this PR: timeouts always append and suggest patterntype:regexp. There is some implicit UI change to the query where the patterntype for regexp and literal search is erased from the query box. This is not the case for structural search. So, here are possible invalid suggestions that crop up:

  • patterntype:regexp is suggested when literal search was run
  • patterntype:structural and patterntype:regexp are both in the suggestion box when structural search times out.

This PR reports the correct patterntype for the search mode. I am sad that this change doesn't break anything and doesn't have tests, so I have added some, alexa play despacito, and tested manually with the other search types active:

Screen Shot 2019-12-12 at 11 51 03 PM Screen Shot 2019-12-12 at 11 58 31 PM

Merge request reports

Loading