Filter by tags with full-text-search query

curl -XDELETE 'http://127.0.0.1:9200/test?pretty=true'curl -XPOST
'http://127.0.0.1:9200/test/test/_mapping?pretty=true' -d '{ "test" : {
"properties" : { "text" : { "type" : "string", "index":
"analyzed" }, "tags" : { "type" : "string" } }
}}'

curl -XPOST http://127.0.0.1:9200/test/test -d '{ "text" : "Lorem ipsum
dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliquaLorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua.", "tags" : ["alpha", "zetta", "omega"]}'

curl -XPOST http://127.0.0.1:9200/test/test -d '{ "text" : "Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequatUt enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.", "tags" :
["alpha", "kappa", "gamma"]}'

curl -XPOST http://127.0.0.1:9200/test/test -d '{ "text" : "Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
in culpa qui officia deserunt mollit anim id est laborum.Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.", "tags" :
["alpha", "betta", "psi"]}'

#* I need something like this, to get last document as it contains all
three tags specified in the filte*r

curl -XGET 'http://127.0.0.1:9200/test/test/_search?pretty=true' -d '{
"query": { "filtered": { "query": { "match": {
"text": "dolore" } }, "filter": { "bool": {
"must":{ "terms": {"tags": ["alpha", "zetta", "ksi", "betta",
"psi"]} , "minimum_should_match" : 3 } } }
} }}'

*# this works as expected but I cannot understand how to add fts query to
this *

curl -XGET http://127.0.0.1:9200/test/test/_search -d '{ "query": {
"terms" : { "tags": ["alpha", "zetta", "ksi", "betta", "psi"]"tags":
["alpha", "zetta", "ksi", "betta", "psi"], "minimum_should_match" :
3 } }}'

--
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/5f0a81d4-ec7d-4742-a7f7-986fb11e9e2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.