Span Near Query is not working for me

I have below script to test span near query

#!/bin/bash

curl -XPUT 'ourhost/xiaolongindexername/'

curl -XPUT 'ourhost/xiaolongindexername/xiaolongindexertype/1' -d '{

"company":"Safari Books Online"

}'

#test match query to make sure index is inserted properly

curl -XGET 'ourhost/xiaolongindexername/xiaolongindexertype/_search' -d
'{"query": {"match":{"company":"safari"}}}'

curl -XGET 'ourhost/xiaolongindexername/xiaolongindexertype/_search' -d '{
"query": { "span_near" : {"clauses" : [ {"span_term" : {"company" :
"Safari"}}, {"span_term" : {"company" : "Books"}}, {"span_term" : {
"company" : "Online" } } ],"slop" : 100,"in_order" :
false,"collect_payloads" : false } } }'

I can get result for match query but not for span query.

Does anyone have any clue?

Thanks,

Xiaolong

--
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/87c7a904-f017-431f-925b-8f5830aeeccc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.