9

I am searching a codebase indexed by OpenGrok, the -a option has been enabled to allow the first character of a search term to be a wildcard. I would like to find all occurrences of method foo that take some string parameter (foo("") with one or more characters in the string) and the method is within 5 words of variable bar.


With the breakup of words provided by the standard tokenizer I can use +full:"foo bar"~5 to get all foo( near bar, but excluding the parameterless methods is a problem because (" is indexed as two whitespace characters, so for example foo("jar") seems to match foo AND \ \ AND jar AND \ \". The syntax doesn't look like it supports a search for this combination (even without the wildcard string rather than "jar") with a ""~5 proximity search. Any ideas on how to achieve all or part of this, given that changing the tokenizer is not an option at the moment?

4

0 回答 0