Percolator - Match all words

Hi

As shown in the example below, if I search for the string "New York", how
can avoid retrieving document that are not an exact match?

curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{
"query" : {
"match" : {
"body" : "New Jersey"
}
}
}'

>>

{"_index":"cities","_type":".percolator","_id":"1","_version":1,"created":true}

curl -XGET 'localhost:9201/cities/city/_percolate' -d '{
"doc" : {
"body" : "New York"
}
}'

>>

{"took":4,"_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"_index":"cities","_id":"1"}]}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

May be this? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 15 avril 2014 à 06:15:21, Louis-René Haché (talktome@lrhache.com) a écrit:

Hi

As shown in the example below, if I search for the string "New York", how can avoid retrieving document that are not an exact match?

curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{
"query" : {
"match" : {
"body" : "New Jersey"
}
}
}'

>> {"_index":"cities","_type":".percolator","_id":"1","_version":1,"created":true}

curl -XGET 'localhost:9201/cities/city/_percolate' -d '{
"doc" : {
"body" : "New York"
}
}'

>> {"took":4,"_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"_index":"cities","_id":"1"}]}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.534cf669.6b8b4567.122b9%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

This works well! Thanks a lot!

On Tuesday, April 15, 2014 5:05:45 AM UTC-4, David Pilato wrote:

May be this?
Elasticsearch Platform — Find real-time answers at scale | Elastic

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 15 avril 2014 à 06:15:21, Louis-René Haché (talk...@lrhache.com<javascript:>)
a écrit:

Hi

As shown in the example below, if I search for the string "New York", how
can avoid retrieving document that are not an exact match?

curl -XPUT 'localhost:9201/cities/.percolator/1' -d '{
"query" : {
"match" : {
"body" : "New Jersey"
}
}
}'

>>

{"_index":"cities","_type":".percolator","_id":"1","_version":1,"created":true}

curl -XGET 'localhost:9201/cities/city/_percolate' -d '{
"doc" : {
"body" : "New York"
}
}'

>>

{"took":4,"_shards":{"total":5,"successful":5,"failed":0},"total":1,"matches":[{"_index":"cities","_id":"1"}]}

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/72c490fe-0b17-4bfd-82b9-3426dcf35c47%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d973a1d-b9d6-4d59-a558-f6a2b699e36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.