# Is percolator supposed to work with regex queries?

**URL:** https://discuss.elastic.co/t/is-percolator-supposed-to-work-with-regex-queries/13094
**Category:** Elasticsearch
**Created:** [August 6, 2013, 7:58pm UTC](https://discuss.elastic.co/t/is-percolator-supposed-to-work-with-regex-queries/13094 "2013-08-06T19:58:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ara\_Ebrahimi](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Ara\_Ebrahimi](https://discuss.elastic.co/u/Ara_Ebrahimi)
#### Post date: [August 6, 2013, 7:58pm UTC](https://discuss.elastic.co/t/is-percolator-supposed-to-work-with-regex-queries/13094/1 "2013-08-06T19:58:55Z")

</div>

Hi,

I have a document indexed in ES and it has a uriPattern non\_analyzed string  
field. When I do this:

curl -XPOST [http://localhost:9200/\_search](http://localhost:9200/_search) -d '{  
"query":{  
"filtered":{  
"query":{  
"match\_all":{

```
        }
     },
     "filter":{
        "regexp":{

```

"couchbaseDocument.doc.uriPattern":"https\:\/\/github\.com\/.\*"  
}  
}  
}  
}  
}'

It matches "uriPattern":"[https://github.com/x/y](https://github.com/x/y)" and returns the result.

BUT if I pass the same string to a percolator like this:

curl -XPUT localhost:9200/\_percolator/connectors/githubproject -d '{  
"query": {  
"regexp": {  
"uriPattern": "https\:\/\/github\.com\/.\*",  
"flags" : "ALL"  
}  
}  
}'

curl -XGET localhost:9200/connectors/couchbaseDocument/\_percolate -d '{  
"doc" : {  
"uriPattern" : "[https://github.com/x/y](https://github.com/x/y)"  
}  
}'

It does not match. I've tested all sorts of escapings and regex queries  
with special characters don't seem to work in the context of percolators.

Am I doing something wrong?

Ara.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ara\_Ebrahimi](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Ara\_Ebrahimi](https://discuss.elastic.co/u/Ara_Ebrahimi)
#### Post date: [August 8, 2013, 5:24pm UTC](https://discuss.elastic.co/t/is-percolator-supposed-to-work-with-regex-queries/13094/2 "2013-08-08T17:24:05Z")

</div>

Anybody? Any idea?

Ara.

On Tuesday, August 6, 2013 12:58:55 PM UTC-7, Ara Ebrahimi wrote:

> Hi,
> 
> I have a document indexed in ES and it has a uriPattern non\_analyzed  
> string field. When I do this:
> 
> curl -XPOST [http://localhost:9200/\_search](http://localhost:9200/_search) -d '{  
> "query":{  
> "filtered":{  
> "query":{  
> "match\_all":{
> 
> ```
> }
> },
> "filter":{
> "regexp":{
> 
> ```
> 
> "couchbaseDocument.doc.uriPattern":"https\:\/\/github\.com\/.\*"  
> }  
> }  
> }  
> }  
> }'
> 
> It matches "uriPattern":"[https://github.com/x/y](https://github.com/x/y)" and returns the result.
> 
> BUT if I pass the same string to a percolator like this:
> 
> curl -XPUT localhost:9200/\_percolator/connectors/githubproject -d '{  
> "query": {  
> "regexp": {  
> "uriPattern": "https\:\/\/github\.com\/.\*",  
> "flags" : "ALL"  
> }  
> }  
> }'
> 
> curl -XGET localhost:9200/connectors/couchbaseDocument/\_percolate -d '{  
> "doc" : {  
> "uriPattern" : "[https://github.com/x/y](https://github.com/x/y)"  
> }  
> }'
> 
> It does not match. I've tested all sorts of escapings and regex queries  
> with special characters don't seem to work in the context of percolators.
> 
> Am I doing something wrong?
> 
> Ara.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 2:22am UTC](https://discuss.elastic.co/t/is-percolator-supposed-to-work-with-regex-queries/13094/3 "2017-07-06T02:22:02Z")

</div>


