Skip to content

search: additional parentheses heuristics

Created by: rvantonder

The heuristic in #9760 works well but only triggers when there are no explicit parentheses. In some cases, some explicit parentheses exist, so the heuristic doesn't trigger, as in,

("main(" and "name(") or testing count:1000 or count:1000 ("main(" and "name(") or testing or count:1000 "main(" and ("name(" or testing)

For these, what we could do for the heuristic instead is just parenthesize the pattern we think is reasonable (i.e., a contiguous string without a field:param value`). Thus:

("main(" and "name(") or testing count:1000 => (("main(" and "name(") or testing) count:1000

and

count:1000 "main(" and ("name(" or testing) => count:1000 ("main(" and ("name(" or testing))