No. GET works for running searches.
It could be an issue if you are using an OLD SENSE version and not Marvel.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 20 juin 2014 à 11:28:23, Cédric Hourcade (ced@wal.fr) a écrit:
It looks like you are doing a GET rather than a POST, if so your query content is ignored.
Cédric Hourcade
ced@wal.fr
On Fri, Jun 20, 2014 at 11:26 AM, Alexandre Touret alexandre@touret.info wrote:
Yes
My request for doe always return that answer
Le vendredi 20 juin 2014 11:24:33 UTC+2, David Pilato a écrit :
Searching for DOE gives you that answer?
If so, it's not normal IMHO. You should try to reproduce it with a full SENSE script recreation so we can replay it and help you from here.
See http://www.elasticsearch.org/help/ for information.
About parent child, you could read this: http://www.elasticsearch.org/blog/managing-relations-inside-elasticsearch/
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 20 juin 2014 à 11:19:23, Alexandre Touret (alex...@touret.info) a écrit:
Hello,
thanks for your response
When I add an other carte
put /tp/carte/20450813
{
"dateEdition": "2014-06-01T22:00:00.000Z",
"adherents": [
{
"birthday": "1963-03-22T23:00:00.000Z",
"firstname": "FLORENCE",
"lastname": "SMITH"
},
{
"birthday": "2001-10-12T22:00:00.000Z",
"firstname": "M ANGELO",
"lastname": "SMITH" },
{
"birthday": "2003-07-30T22:00:00.000Z",
"firstname": "M LILI",
"lastname": "SMITH"
}
]
}
and I run the query described above, I have both of the two 'carte'
Is it "normal" ?
Do you have an example or a link to illustrate the parent/child feature ?
Thanks
Le vendredi 20 juin 2014 11:12:04 UTC+2, David Pilato a écrit :
Hey Alexandre,
This is correct. You are searching for a carte which contains an adherent.
Elasticsearch gives you a carte object as an answer. And elasticsearch gives you back exactly what you have indexed.
That being said, I think you could look at parent/child feature for that use case.
Or you can have one carte object per adherent?
Makes sense?
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 20 juin 2014 à 11:06:40, Alexandre Touret (alex...@touret.info) a écrit:
hello,
I'm trying to index and query an index store in ES 1.2. I both create and populate the index with the JAVA API using the transportclient api. I have the following mapping:
get /tp/carte/_mapping
{
"tp": {
"mappings": {
"carte": {
"properties": {
"adherents": {
"properties": {
"birthday": {
"type": "date",
"format": "dateOptionalTime"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
}
}
},
"dateEdition": {
"type": "date",
"format": "dateOptionalTime"
}
}
}
}
}
}
When I search ob object with the ID, it works fine but, when I try to query the content of one of my nested objects, ES always returns all the objects stored in the index. I also tried to create the objects manually with sense and I have the same behaviour.
Example of my insert
put /tp/carte/20454795
{
"dateEdition": "2014-06-01T22:00:00.000Z",
"adherents": [
{
"birthday": "1958-05-05T23:00:00.000Z",
"firstname": "ANDREW",
"lastname": "DOE"
},
{
"birthday": "1964-03-01T23:00:00.000Z",
"firstname": "ROBERT",
"lastname": "DOE"
},
{
"birthday": "1989-02-27T23:00:00.000Z",
"firstname": "DAVID",
"lastname": "DOE"
},
{
"birthday": "1990-12-11T23:00:00.000Z",
"firstname": "JOHN",
"lastname": "DOE"
}
]
}
Finally, you could find below a query executed in sense
get /tp/carte/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"adherents.lastname": {
"query": "DOE"
}
}
}
]
}
}
How can I fix that ?
Thanks
Regards
Alexandre
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/e399b978-4d27-43f7-a294-fc2b1033e438%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/CAJQxjPO6khU8VkbOqsdHpWFeJhaoGH5nhbnyOzGjo_d_7Ecfyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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/etPan.53a4003a.1befd79f.198d%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.