Hello,
Is there any way to NOT search on a specific field while performing a full text based search using the Query DSL / Query String Query syntax, following is the index i am creating.
{
"e3c95a54-2971-47ec-b177-1fdbe9e04639": {
"mappings": {
"81f71ece-9acc-4750-82f6-53fe47bd4489": {
"properties": {
"docfilename": {
"type": "string"
},
"usercomments": {
"type": "string"
},
"filepath": {
"type": "string",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
},
"singlewordfield": {
"type": "string",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
}
}
{
"docfilename": "Profile.doc",
"usercomments": "this is a sample comment entered by the user.",
"filepath": "\path\Profile.doc",
"singlewordfield": "apple"
}
using the following query string syntax i want to search on all the fields except the usercomments field, is this possible using the query string syntax, or is there any other approach to acheive this.
{"query" :{"query_string":{"query":"profile"}}}
Thanks,
Vikas.