Query pages in a space for specific id-macros (anchors)

I would like to find pages containing an id macro(?) with a specific id value string {{id="this_is_the_droids_im_looking_for"}}. Is this possible with a velocity script?

I limit the search space with some xwql like

where doc.space like 'User_help%' or doc.space like 'User_help.%'

but how to list and parse e.g. macros in the documents?

Thanks a lot!

Hi, you can use the SOLR QL, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20Query%20API

Many thanks!