Reverse pattern search analyser

I am wondering if it is possible to create a "reverse" pattern search/query analyser where the pattern is stored in the field and the string to match against is the query

As an example

doc:
my_field_re: bla-[a-z0-9]+

query:
my_field_re: boo-test

nothing returned

query:
my_field_re: bla-test

doc returned

query:
my_field_re: bla-test-more

nothing returned

Have a look at the groups parameter here. I think that is what you want.

Hi,

this is probably possible with percolator api. You register your pattern as percolator queries (potentially with some metadata, then you percolate your docs containing the string to match against it. I think the only step missing is the "doc return" part, in the standard way you get back the Id of the percolate query. You probably need a second lookup fo the doc content by Id.

Whoops! Sorry, I thought you wanted a different thing because I didn't read closely. Sorry!

Thank you, the percolator api looks very promising.