Newbie question--search based on multimatch or queryString

Hello Folks,
I am new to elasticsearch (as well as to Lucene) and have some questions, I
have followed the Java Jest API to build some code into our rest API to
call into elasticsearch to perform inserts and searches. So far inserts
work pretty easily , however other than basic searches I am not getting any
results back from any of my searches through the Java API, here's some
context:

Basic search results without any qualifiers (apologize for length of this):
"hits":
{
"total": 2,
"max_score": 1,
"hits":
[
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is funny message",
"sequenceNum": 1,
"batch_id": "1",
"timestamp": "NOW",
"id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"message": "this is really funny message",
"time": 1349514767441,
"level": "Debug",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid",
"start_time": 1349514767441,
"appliance": "appliance3"
}
},
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is bazaar message",
"sequenceNum": 1,
"batch_id": "2",
"timestamp": "NOW",
"id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"message": "this is bazaar message",
"time": 1349514767441,
"level": "Info",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid2",
"start_time": 1349514767441,
"appliance": "appliance2"
}
}
]
}

Here's an example of the search request body that results from my code:

{
"from" : 0,
"size" : 10,
"query" : {
"multi_match" : {
"query" : "appliance2",
"fields" : [ "application,appliance" ]
}
},
"filter" : {
"range" : {
"time" : {
"from" : 1349514767442,
"to" : 1349514767444,
"include_lower" : true,
"include_upper" : true
}
}
},
"fields" : [ ],
"sort" : [ {
"time" : {
"order" : "desc"
}
} ]
}

I have tried to call ES directly and paste the above into the request body
and it is also not returning any results. My usecase is such that I have
mutliple keys that have the same value, for example I have
appliance,application and I might have a value of appliance2, I have tried
to built a querystring as well as a multi match query using the Jest API
and neither seem to return any results, am I missing something obvious
here, I have scoured the docs and the mailing list and didnt see anything
that would be insightful. My code seems to be in order so I am placing
my bet on how I'm doing the search. I appreciate some insight on this.

Regards

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

One other piece of metadata, even if I remove the sort filter I am using
for time I get zero results.

On Wednesday, March 27, 2013 8:17:40 AM UTC-7, Saikat Kanjilal wrote:

Hello Folks,
I am new to elasticsearch (as well as to Lucene) and have some questions,
I have followed the Java Jest API to build some code into our rest API to
call into elasticsearch to perform inserts and searches. So far inserts
work pretty easily , however other than basic searches I am not getting any
results back from any of my searches through the Java API, here's some
context:

Basic search results without any qualifiers (apologize for length of this):
"hits":
{
"total": 2,
"max_score": 1,
"hits":
[
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is funny message",
"sequenceNum": 1,
"batch_id": "1",
"timestamp": "NOW",
"id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"message": "this is really funny message",
"time": 1349514767441,
"level": "Debug",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid",
"start_time": 1349514767441,
"appliance": "appliance3"
}
},
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is bazaar message",
"sequenceNum": 1,
"batch_id": "2",
"timestamp": "NOW",
"id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"message": "this is bazaar message",
"time": 1349514767441,
"level": "Info",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid2",
"start_time": 1349514767441,
"appliance": "appliance2"
}
}
]
}

Here's an example of the search request body that results from my code:

{
"from" : 0,
"size" : 10,
"query" : {
"multi_match" : {
"query" : "appliance2",
"fields" : [ "application,appliance" ]
}
},
"filter" : {
"range" : {
"time" : {
"from" : 1349514767442,
"to" : 1349514767444,
"include_lower" : true,
"include_upper" : true
}
}
},
"fields" : [ ],
"sort" : [ {
"time" : {
"order" : "desc"
}
} ]
}

I have tried to call ES directly and paste the above into the request body
and it is also not returning any results. My usecase is such that I have
mutliple keys that have the same value, for example I have
appliance,application and I might have a value of appliance2, I have tried
to built a querystring as well as a multi match query using the Jest API
and neither seem to return any results, am I missing something obvious
here, I have scoured the docs and the mailing list and didnt see anything
that would be insightful. My code seems to be in order so I am placing
my bet on how I'm doing the search. I appreciate some insight on this.

Regards

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

I think your issue is here:
"fields" : [ "application,appliance" ]

Check the multi match doc.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2013 à 16:30, Saikat Kanjilal sxk1969@gmail.com a écrit :

One other piece of metadata, even if I remove the sort filter I am using for time I get zero results.

On Wednesday, March 27, 2013 8:17:40 AM UTC-7, Saikat Kanjilal wrote:

Hello Folks,
I am new to elasticsearch (as well as to Lucene) and have some questions, I have followed the Java Jest API to build some code into our rest API to call into elasticsearch to perform inserts and searches. So far inserts work pretty easily , however other than basic searches I am not getting any results back from any of my searches through the Java API, here's some context:

Basic search results without any qualifiers (apologize for length of this):
"hits":
{
"total": 2,
"max_score": 1,
"hits":
[
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is funny message",
"sequenceNum": 1,
"batch_id": "1",
"timestamp": "NOW",
"id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"message": "this is really funny message",
"time": 1349514767441,
"level": "Debug",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid",
"start_time": 1349514767441,
"appliance": "appliance3"
}
},
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is bazaar message",
"sequenceNum": 1,
"batch_id": "2",
"timestamp": "NOW",
"id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"message": "this is bazaar message",
"time": 1349514767441,
"level": "Info",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid2",
"start_time": 1349514767441,
"appliance": "appliance2"
}
}
]
}

Here's an example of the search request body that results from my code:

{
"from" : 0,
"size" : 10,
"query" : {
"multi_match" : {
"query" : "appliance2",
"fields" : [ "application,appliance" ]
}
},
"filter" : {
"range" : {
"time" : {
"from" : 1349514767442,
"to" : 1349514767444,
"include_lower" : true,
"include_upper" : true
}
}
},
"fields" : [ ],
"sort" : [ {
"time" : {
"order" : "desc"
}
} ]
}

I have tried to call ES directly and paste the above into the request body and it is also not returning any results. My usecase is such that I have mutliple keys that have the same value, for example I have appliance,application and I might have a value of appliance2, I have tried to built a querystring as well as a multi match query using the Jest API and neither seem to return any results, am I missing something obvious here, I have scoured the docs and the mailing list and didnt see anything that would be insightful. My code seems to be in order so I am placing my bet on how I'm doing the search. I appreciate some insight on this.

Regards
--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

David,
Thanks for the response, I found this issue right after I sent this out,
which lead to another issue, I currently have a Set of strings of arbitrary
size fro the keys, is there an easy way to put this into the multimatch
API, it seems like the API requires a comma separated list of individual
strings?
Thanks

On Wednesday, March 27, 2013 8:17:40 AM UTC-7, Saikat Kanjilal wrote:

Hello Folks,
I am new to elasticsearch (as well as to Lucene) and have some questions,
I have followed the Java Jest API to build some code into our rest API to
call into elasticsearch to perform inserts and searches. So far inserts
work pretty easily , however other than basic searches I am not getting any
results back from any of my searches through the Java API, here's some
context:

Basic search results without any qualifiers (apologize for length of this):
"hits":
{
"total": 2,
"max_score": 1,
"hits":
[
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is funny message",
"sequenceNum": 1,
"batch_id": "1",
"timestamp": "NOW",
"id": "130cdcba-58ad-4de7-ade1-00b5257b106f",
"message": "this is really funny message",
"time": 1349514767441,
"level": "Debug",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid",
"start_time": 1349514767441,
"appliance": "appliance3"
}
},
{
"_index": "foo.bar",
"_type": "elasticsearch",
"_id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"_score": 1,
"_source":
{
"application": "TEST",
"line": "1",
"text_all": "this is bazaar message",
"sequenceNum": 1,
"batch_id": "2",
"timestamp": "NOW",
"id": "8b8ax134-7ad3-4e3c-9e4c-f19a0d4f0009",
"message": "this is bazaar message",
"time": 1349514767441,
"level": "Info",
"file": "file1",
"thread": "thread1",
"logger": "slogger",
"grid": "grid2",
"start_time": 1349514767441,
"appliance": "appliance2"
}
}
]
}

Here's an example of the search request body that results from my code:

{
"from" : 0,
"size" : 10,
"query" : {
"multi_match" : {
"query" : "appliance2",
"fields" : [ "application,appliance" ]
}
},
"filter" : {
"range" : {
"time" : {
"from" : 1349514767442,
"to" : 1349514767444,
"include_lower" : true,
"include_upper" : true
}
}
},
"fields" : [ ],
"sort" : [ {
"time" : {
"order" : "desc"
}
} ]
}

I have tried to call ES directly and paste the above into the request body
and it is also not returning any results. My usecase is such that I have
mutliple keys that have the same value, for example I have
appliance,application and I might have a value of appliance2, I have tried
to built a querystring as well as a multi match query using the Jest API
and neither seem to return any results, am I missing something obvious
here, I have scoured the docs and the mailing list and didnt see anything
that would be insightful. My code seems to be in order so I am placing
my bet on how I'm doing the search. I appreciate some insight on this.

Regards

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

I am new to elasticsearch and have some questions, I have followed the Java
Jest API to build some code into our rest API to call into elasticsearch to
perform inserts and searches.

I have to display text in multiple languages in one language search..means
i search from english langauage then only english text are coming not
france or german language.and i have to display all the language text
whatever available in the index.

So,Please suggest me what i have to do..

--
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.
For more options, visit https://groups.google.com/groups/opt_out.