Include and exclude pattern

(陈浩) #1

I want to filter url which not include ".doc",".zip",".pdf" etc.

I use query: -url.keyword:.doc OR OR -url.keywork:*.pdf. it works.

When i try the syntax:-url.keywork:*.(doc|zip|pdf),but it failed.

Is there way to simplify the exclude query syntax?

(Jon Budzenski) #2

Does -url.keyword:/.*\.(doc|zip|pdf)/ work for you? I believe above is a combo of a regex and glob style, so going with a full regex should get us moving in the right direction.

(陈浩) #3

it works,thanks a lot.

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.