Can we apply NOT operator before Proximity?


(Sumit Guptaa) #1

Hi all,

can we apply NOT before proximity....is this query work or not?

curl -XGET 'http://localhost:9200/sumitproximityagain/proximityindexagain/_search' -d '{
"query" : {

"query_string" : {
    "default_field" : "message",
    "query" : NOT "\"Elastic Search\"~4"
}

},
"highlight" : {
    "fields" : {
        "message" : {}
    }
}

}'

thanx

Regards,
Sumit Gupta


(pulkitsinghal) #2

Actually I too am curious about this. Does anyone in the group happen to
know if Lucene in general supports applying a not (inversing) on a phrase
query?

On Mon, Apr 16, 2012 at 4:39 AM, Sumit Guptaa sumit.gupta.ngi@gmail.comwrote:

Hi all,

can we apply NOT before proximity....is this query work or not?

curl -XGET
'http://localhost:9200/sumitproximityagain/proximityindexagain/_search' -d
'{
"query" : {

"query_string" : {
"default_field" : "message",
"query" : NOT ""Elastic Search"~4"
}

},
"highlight" : {
"fields" : {
"message" : {}
}
}
}'

thanx

Regards,
Sumit Gupta

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/can-we-apply-NOT-operator-before-Proximity-tp3913957p3913957.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(Shay Banon) #3

It should work...

On Mon, May 28, 2012 at 2:19 PM, Pulkit Singhal pulkitsinghal@gmail.comwrote:

Actually I too am curious about this. Does anyone in the group happen to
know if Lucene in general supports applying a not (inversing) on a phrase
query?

On Mon, Apr 16, 2012 at 4:39 AM, Sumit Guptaa sumit.gupta.ngi@gmail.comwrote:

Hi all,

can we apply NOT before proximity....is this query work or not?

curl -XGET
'http://localhost:9200/sumitproximityagain/proximityindexagain/_search'
-d
'{
"query" : {

"query_string" : {
"default_field" : "message",
"query" : NOT ""Elastic Search"~4"
}

},
"highlight" : {
"fields" : {
"message" : {}
}
}
}'

thanx

Regards,
Sumit Gupta

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/can-we-apply-NOT-operator-before-Proximity-tp3913957p3913957.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #4