Ignoring phrases or using negative lookbehind in regexp


(Andrew Barraclough) #1

Is it possible to do a negative look behind in regexp query or filter? There may also be a better way to do this so I am open to suggestions.

I would like to match the word maps but not the term apple maps.

If it only contains apple maps it should NOT match.
If it contains apple maps and maps it SHOULD match.
If it contains maps it SHOULD match.

The regular expression equivalent I believe should be something like:

(?<!apple )maps

Search examples


Apple maps could be better.

This should not match


I like apple maps more than google maps.

This should match


Maps are fun.

This should match


Any suggestions are greatly appreciated.


(Andrew Barraclough) #2

Would this is possible with scoring? If apple maps could somehow have no impact on the result.


(system) #3