smhdiu
(smhdiu)
November 1, 2012, 12:43pm
1
Hello all,
i am new to elasticsearch and lucene.
i have following json string that i want to get parse from elastic search.
{
"fields": [
"email",
"firstName",
"lastName"
],
"query": {
"query_string": {
"fields": [
"email","firstName","email"
],
"query": "Jelena @gmail.com ",
"use_dis_max": true
}
}
}
just want to know the method to pass this string to java api.
any sample code in java api will be much appreciated.
Thanks in advanced
Mohsin
--
dadoonet
(David Pilato)
November 1, 2012, 1:36pm
2
Have a look here: GitHub - elasticsearchfr/hands-on: Hands On Lab
It should help you to start.
Answers are in answers branch: GitHub - elasticsearchfr/hands-on at answers
HTH
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 13:43, mohsin husen smhdiu@gmail.com a écrit :
Hello all,
i am new to elasticsearch and lucene.
i have following json string that i want to get parse from Elasticsearch.
{
"fields": [
"email",
"firstName",
"lastName"
],
"query": {
"query_string": {
"fields": [
"email","firstName","email"
],
"query": "Jelena @gmail.com ",
"use_dis_max": true
}
}
}
just want to know the method to pass this string to java api.
any sample code in java api will be much appreciated.
Thanks in advanced
Mohsin
--
--
smhdiu
(smhdiu)
November 1, 2012, 2:23pm
3
That helped me a lot.
Thanks David.
i now know how to search the data.
now once i have the SearchResponce how can i get my fields?
i.e can i get a list of values ?
thanks in adavnced
mohsin
On Thursday, 1 November 2012 13:36:18 UTC, David Pilato wrote:
Have a look here: GitHub - elasticsearchfr/hands-on: Hands On Lab
It should help you to start.
Answers are in answers branch:
GitHub - elasticsearchfr/hands-on at answers
HTH
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 13:43, mohsin husen <smh...@gmail.com <javascript:>> a
écrit :
Hello all,
i am new to elasticsearch and lucene.
i have following json string that i want to get parse from Elasticsearch.
{
"fields": [
"email",
"firstName",
"lastName"
],
"query": {
"query_string": {
"fields": [
"email","firstName","email"
],
"query": "Jelena @gmail.com ",
"use_dis_max": true
}
}
}
just want to know the method to pass this string to java api.
any sample code in java api will be much appreciated.
Thanks in advanced
Mohsin
--
--
dadoonet
(David Pilato)
November 1, 2012, 2:43pm
4
Look here: https://github.com/elasticsearchfr/hands-on/blob/answers/src/test/java/org/elasticsearchfr/handson/ex2/SearchTest.java#L268
You get all hits and you can use Jackson to deserialize hits to your javabeans.
See also: Hands on lab Elasticsearch | PPT
Althought it's in french, you can understand some code.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 15:23, mohsin husen smhdiu@gmail.com a écrit :
That helped me a lot.
Thanks David.
i now know how to search the data.
now once i have the SearchResponce how can i get my fields?
i.e can i get a list of values ?
thanks in adavnced
mohsin
On Thursday, 1 November 2012 13:36:18 UTC, David Pilato wrote:
Have a look here: GitHub - elasticsearchfr/hands-on: Hands On Lab
It should help you to start.
Answers are in answers branch: GitHub - elasticsearchfr/hands-on at answers
HTH
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 13:43, mohsin husen smh...@gmail.com a écrit :
Hello all,
i am new to elasticsearch and lucene.
i have following json string that i want to get parse from Elasticsearch.
{
"fields": [
"email",
"firstName",
"lastName"
],
"query": {
"query_string": {
"fields": [
"email","firstName","email"
],
"query": "Jelena @gmail.com ",
"use_dis_max": true
}
}
}
just want to know the method to pass this string to java api.
any sample code in java api will be much appreciated.
Thanks in advanced
Mohsin
--
--
--
smhdiu
(smhdiu)
November 1, 2012, 4:17pm
5
It has answer to all my question
Cheers !
Thanks a ton David !
Mohsin
On Thursday, 1 November 2012 14:43:15 UTC, David Pilato wrote:
Look here:
https://github.com/elasticsearchfr/hands-on/blob/answers/src/test/java/org/elasticsearchfr/handson/ex2/SearchTest.java#L268
You get all hits and you can use Jackson to deserialize hits to your
javabeans.
See also:
Hands on lab Elasticsearch | PPT
Althought it's in french, you can understand some code.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 15:23, mohsin husen <smh...@gmail.com <javascript:>> a
écrit :
That helped me a lot.
Thanks David.
i now know how to search the data.
now once i have the SearchResponce how can i get my fields?
i.e can i get a list of values ?
thanks in adavnced
mohsin
On Thursday, 1 November 2012 13:36:18 UTC, David Pilato wrote:
Have a look here: GitHub - elasticsearchfr/hands-on: Hands On Lab
It should help you to start.
Answers are in answers branch:
GitHub - elasticsearchfr/hands-on at answers
HTH
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 1 nov. 2012 à 13:43, mohsin husen smh...@gmail.com a écrit :
Hello all,
i am new to elasticsearch and lucene.
i have following json string that i want to get parse from Elasticsearch.
{
"fields": [
"email",
"firstName",
"lastName"
],
"query": {
"query_string": {
"fields": [
"email","firstName","email"
],
"query": "Jelena @gmail.com ",
"use_dis_max": true
}
}
}
just want to know the method to pass this string to java api.
any sample code in java api will be much appreciated.
Thanks in advanced
Mohsin
--
--
--