Search code examples
regexluceneopengrok

Opengrok cannot escape anchors on full search


I am using opengrok at work, trying to match certain anchors in the codebase using regular expressions

From opengrok documentation:

Escaping special characters: Opengrok supports escaping special characters that are part of the query syntax. Current special characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? : \ /

Since anchors are not special characters my query is as follow:

enter image description here

lucene fails to parse my query for some reason:

enter image description here


Now when I escape both anchors /\<property\>*/, it does not fail but I get 0 results. There are thousands of * text in our codebase. What am I doing wrong?


Solution

  • The "<" and ">" characters are not indexed by Lucene (they're not in the index), so they're not searchable.

    See more related info here.