Older versions of parent document returned in has_child query for Parent/Child setup

I have a parent/child mapping for topics and comments. Whenever a comment
is added to the topic, i index the comment, then update the topic index
(increment comment count and update last post date).

Then when I use has_child search on the topics, I get duplicate results of
the matching parent documents, and upon inspection, they seem to be
previous versions of the topic (based on comment count and last post
dates). So if say a topic has 3 comments (has also been updated in the
index 3 times), the record will show up in the has_child search results 3
times, showing all versions of the topic.

Doing a _cache/clear fixes this but does that mean every time I reindex a
topic for adding child documents, I have to clear the cache? Or am I
missing something?

For my has_child query, i'm using 'sum' for the 'score_type'.

Would really appreciate help on this. I've been asking this in the irc
channel for a day and nothing seems to get answered there.

--

Hi Jesus

This sounds like it might be a bug. If you could open an issue showing
exactly how to recreate this, it'd help us to find the issue

ta

Clint

On Mon, 2013-01-14 at 19:03 -0800, Jesus Domingo wrote:

I have a parent/child mapping for topics and comments. Whenever a
comment is added to the topic, i index the comment, then update the
topic index (increment comment count and update last post date).

Then when I use has_child search on the topics, I get duplicate
results of the matching parent documents, and upon inspection, they
seem to be previous versions of the topic (based on comment count and
last post dates). So if say a topic has 3 comments (has also been
updated in the index 3 times), the record will show up in the
has_child search results 3 times, showing all versions of the topic.

Doing a _cache/clear fixes this but does that mean every time I
reindex a topic for adding child documents, I have to clear the cache?
Or am I missing something?

For my has_child query, i'm using 'sum' for the 'score_type'.

Would really appreciate help on this. I've been asking this in the irc
channel for a day and nothing seems to get answered there.

--

--

I am seeing this today as well on version 0.20.5 -- did an issue ever get
created?

On Tuesday, January 15, 2013 7:52:16 AM UTC-5, Clinton Gormley wrote:

Hi Jesus

This sounds like it might be a bug. If you could open an issue showing
exactly how to recreate this, it'd help us to find the issue

ta

Clint

On Mon, 2013-01-14 at 19:03 -0800, Jesus Domingo wrote:

I have a parent/child mapping for topics and comments. Whenever a
comment is added to the topic, i index the comment, then update the
topic index (increment comment count and update last post date).

Then when I use has_child search on the topics, I get duplicate
results of the matching parent documents, and upon inspection, they
seem to be previous versions of the topic (based on comment count and
last post dates). So if say a topic has 3 comments (has also been
updated in the index 3 times), the record will show up in the
has_child search results 3 times, showing all versions of the topic.

Doing a _cache/clear fixes this but does that mean every time I
reindex a topic for adding child documents, I have to clear the cache?
Or am I missing something?

For my has_child query, i'm using 'sum' for the 'score_type'.

Would really appreciate help on this. I've been asking this in the irc
channel for a day and nothing seems to get answered there.

--

--
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.

Here's my query also in case it helps:

curl -XGET localhost:9200/shares/share/_search?pretty -d '{
"query": {
"has_child": {
"type": "comment",
"score_type": "sum",
"query": {
"term": {
"text.lower": {
"value": "#bestoftunewiki"
}
}
}
}
},
"from": 0,
"size": 10,
"sort": [
{
"id": {
"sort_mode": null,
"order": "desc",
"missing": null,
"ignore_unmapped": null
}
}
]
}'

On Thursday, May 23, 2013 3:05:08 PM UTC-4, Chad Kouse wrote:

I am seeing this today as well on version 0.20.5 -- did an issue ever get
created?

On Tuesday, January 15, 2013 7:52:16 AM UTC-5, Clinton Gormley wrote:

Hi Jesus

This sounds like it might be a bug. If you could open an issue showing
exactly how to recreate this, it'd help us to find the issue

ta

Clint

On Mon, 2013-01-14 at 19:03 -0800, Jesus Domingo wrote:

I have a parent/child mapping for topics and comments. Whenever a
comment is added to the topic, i index the comment, then update the
topic index (increment comment count and update last post date).

Then when I use has_child search on the topics, I get duplicate
results of the matching parent documents, and upon inspection, they
seem to be previous versions of the topic (based on comment count and
last post dates). So if say a topic has 3 comments (has also been
updated in the index 3 times), the record will show up in the
has_child search results 3 times, showing all versions of the topic.

Doing a _cache/clear fixes this but does that mean every time I
reindex a topic for adding child documents, I have to clear the cache?
Or am I missing something?

For my has_child query, i'm using 'sum' for the 'score_type'.

Would really appreciate help on this. I've been asking this in the irc
channel for a day and nothing seems to get answered there.

--

--
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 more observation - we never noticed this when we had 2 nodes both
running openjdk 6 -- now we have 3 nodes running oracle's java 7 -- so, it
could be going from 2 to 3 nodes.. or could be the java switch.

On Thursday, May 23, 2013 3:10:57 PM UTC-4, Chad Kouse wrote:

Here's my query also in case it helps:

curl -XGET localhost:9200/shares/share/_search?pretty -d '{
"query": {
"has_child": {
"type": "comment",
"score_type": "sum",
"query": {
"term": {
"text.lower": {
"value": "#bestoftunewiki"
}
}
}
}
},
"from": 0,
"size": 10,
"sort": [
{
"id": {
"sort_mode": null,
"order": "desc",
"missing": null,
"ignore_unmapped": null
}
}
]
}'

On Thursday, May 23, 2013 3:05:08 PM UTC-4, Chad Kouse wrote:

I am seeing this today as well on version 0.20.5 -- did an issue ever get
created?

On Tuesday, January 15, 2013 7:52:16 AM UTC-5, Clinton Gormley wrote:

Hi Jesus

This sounds like it might be a bug. If you could open an issue showing
exactly how to recreate this, it'd help us to find the issue

ta

Clint

On Mon, 2013-01-14 at 19:03 -0800, Jesus Domingo wrote:

I have a parent/child mapping for topics and comments. Whenever a
comment is added to the topic, i index the comment, then update the
topic index (increment comment count and update last post date).

Then when I use has_child search on the topics, I get duplicate
results of the matching parent documents, and upon inspection, they
seem to be previous versions of the topic (based on comment count and
last post dates). So if say a topic has 3 comments (has also been
updated in the index 3 times), the record will show up in the
has_child search results 3 times, showing all versions of the topic.

Doing a _cache/clear fixes this but does that mean every time I
reindex a topic for adding child documents, I have to clear the cache?
Or am I missing something?

For my has_child query, i'm using 'sum' for the 'score_type'.

Would really appreciate help on this. I've been asking this in the irc
channel for a day and nothing seems to get answered there.

--

--
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.

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
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.

No I'm not specifying a routing value and they don't have grandparents. However I may index the same document more than once (with the same id)

This is the scenario: a user creates a document and it gets indexed. Another user makes a comment on this document and the comment and the original document(again) get indexed--the comment is given the document id as its parent. The document would have the same id it originally had so i assume this is ok and it would just replace what was already there. this is sort of a fail safe (basically whenever the document changes or has a new comment added we reindex the document and all of its comments for safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley clint@traveljury.com
wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?
clint

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, 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.

I reduced our cluster from 3 nodes to 2 and it seems like this issue has
gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have grandparents.
However I may index the same document more than once (with the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
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.

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad.kouse@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue has
gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have grandparents.
However I may index the same document more than once (with the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
topic/elasticsearch/**SQaQ7QcmcKQ/unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**groups/opt_outhttps://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.

--
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.

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll give
it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse <chad....@gmail.com <javascript:>> wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue has
gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have grandparents.
However I may index the same document more than once (with the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
topic/elasticsearch/**SQaQ7QcmcKQ/unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
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.

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll
give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue has
gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have grandparents.
However I may index the same document more than once (with the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
topic/elasticsearch/**SQaQ7QcmcKQ/unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@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.

Chad, can you share via a gist how you index the document initially and how
you index the document with comment(s) and the search request with the
expected result? This will help us finding out what is going on.

On 4 June 2013 19:18, Chad Kouse chad.kouse@gmail.com wrote:

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll
give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue
has gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have
grandparents. However I may index the same document more than once (with
the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
to**pic/elasticsearch/**SQaQ7QcmcKQ/**unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://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 elasticsearc...@googlegroups.**com.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.

The method indexing is the same whether its the initial indexing or updates
after new comments are added:

When another comment is added this same process will take place but will
include indexing the additional comment in a similar fashion -- do you need
any other info?

On Wednesday, June 5, 2013 10:44:26 AM UTC-4, Martijn v Groningen wrote:

Chad, can you share via a gist how you index the document initially and
how you index the document with comment(s) and the search request with the
expected result? This will help us finding out what is going on.

On 4 June 2013 19:18, Chad Kouse <chad....@gmail.com <javascript:>> wrote:

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll
give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue
has gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have
grandparents. However I may index the same document more than once (with
the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying a
routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/**
to**pic/elasticsearch/**SQaQ7QcmcKQ/**unsubscribe?hl=en-**UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://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 elasticsearc...@googlegroups.**com.
For more options, visit https://groups.google.com/**groups/opt_outhttps://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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
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 Chad,

I can confirm the bug that you're describing. I'll open an issue for it.
Thanks for reporting this!

Martijn

On 5 June 2013 17:45, Chad Kouse chad.kouse@gmail.com wrote:

The method indexing is the same whether its the initial indexing or
updates after new comments are added:

Requests to elasticsearch to index a share + comments · GitHub

When another comment is added this same process will take place but will
include indexing the additional comment in a similar fashion -- do you need
any other info?

On Wednesday, June 5, 2013 10:44:26 AM UTC-4, Martijn v Groningen wrote:

Chad, can you share via a gist how you index the document initially and
how you index the document with comment(s) and the search request with the
expected result? This will help us finding out what is going on.

On 4 June 2013 19:18, Chad Kouse chad....@gmail.com wrote:

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll
give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky at
times. I would suggest pasting the actual curl commands that get issues to
(1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue
has gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have
grandparents. However I may index the same document more than once (with
the same id)

This is the scenario: a user creates a document and it gets indexed.
Another user makes a comment on this document and the comment and the
original document(again) get indexed--the comment is given the document id
as its parent. The document would have the same id it originally had so i
assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying
a routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/*
to***pic/elasticsearch/**SQaQ7QcmcKQ/**unsubscribe?hl=en-UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**grou

ps/opt_out 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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://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 elasticsearc...@**googlegroups.com.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
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.

And here is the issue for it:

On 6 June 2013 15:37, Martijn v Groningen martijn.v.groningen@gmail.comwrote:

Hi Chad,

I can confirm the bug that you're describing. I'll open an issue for it.
Thanks for reporting this!

Martijn

On 5 June 2013 17:45, Chad Kouse chad.kouse@gmail.com wrote:

The method indexing is the same whether its the initial indexing or
updates after new comments are added:

Requests to elasticsearch to index a share + comments · GitHub

When another comment is added this same process will take place but will
include indexing the additional comment in a similar fashion -- do you need
any other info?

On Wednesday, June 5, 2013 10:44:26 AM UTC-4, Martijn v Groningen wrote:

Chad, can you share via a gist how you index the document initially and
how you index the document with comment(s) and the search request with the
expected result? This will help us finding out what is going on.

On 4 June 2013 19:18, Chad Kouse chad....@gmail.com wrote:

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet.. I'll
give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky
at times. I would suggest pasting the actual curl commands that get issues
to (1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this issue
has gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have
grandparents. However I may index the same document more than once (with
the same id)

This is the scenario: a user creates a document and it gets
indexed. Another user makes a comment on this document and the comment and
the original document(again) get indexed--the comment is given the document
id as its parent. The document would have the same id it originally had so
i assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you specifying
a routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
**to****pic/elasticsearch/**SQaQ7QcmcKQ/**unsubscribe?hl=en-UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**grou

ps/opt_out 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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://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 elasticsearc...@**googlegroups.com.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
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.

awesome thanks!

On Thursday, June 6, 2013 11:08:21 AM UTC-4, Martijn v Groningen wrote:

And here is the issue for it:
has_child & has_parent queries don't take deletes into account · Issue #3144 · elastic/elasticsearch · GitHub

On 6 June 2013 15:37, Martijn v Groningen <martijn.v...@gmail.com<javascript:>

wrote:

Hi Chad,

I can confirm the bug that you're describing. I'll open an issue for it.
Thanks for reporting this!

Martijn

On 5 June 2013 17:45, Chad Kouse <chad....@gmail.com <javascript:>>wrote:

The method indexing is the same whether its the initial indexing or
updates after new comments are added:

Requests to elasticsearch to index a share + comments · GitHub

When another comment is added this same process will take place but will
include indexing the additional comment in a similar fashion -- do you need
any other info?

On Wednesday, June 5, 2013 10:44:26 AM UTC-4, Martijn v Groningen wrote:

Chad, can you share via a gist how you index the document initially and
how you index the document with comment(s) and the search request with the
expected result? This will help us finding out what is going on.

On 4 June 2013 19:18, Chad Kouse chad....@gmail.com wrote:

Issue has returned -- it may be related to increased traffic (both new
documents coming in and increased searches)

On Monday, June 3, 2013 5:44:02 PM UTC-4, Chad Kouse wrote:

fwiw we upgraded to 0.90.1 today and haven't seen the issue yet..
I'll give it a few more days and report back.

On Saturday, May 25, 2013 2:32:23 AM UTC-4, Clinton Gormley wrote:

What you are describing should work, but parent-child can be tricky
at times. I would suggest pasting the actual curl commands that get issues
to (1) create the original post and (2) add a comment. Note: actual curl
commands, as opposed to what you think it should be doing - the two may not
be the same. Plus the mapping for your index.

clint

On 24 May 2013 22:36, Chad Kouse chad....@gmail.com wrote:

I reduced our cluster from 3 nodes to 2 and it seems like this
issue has gone away. -- So the bug must be dependent on the number of nodes.

I am using the default 5 shards & 1 replica

On Friday, May 24, 2013 10:01:26 AM UTC-4, Chad Kouse wrote:

No I'm not specifying a routing value and they don't have
grandparents. However I may index the same document more than once (with
the same id)

This is the scenario: a user creates a document and it gets
indexed. Another user makes a comment on this document and the comment and
the original document(again) get indexed--the comment is given the document
id as its parent. The document would have the same id it originally had so
i assume this is ok and it would just replace what was already there. this
is sort of a fail safe (basically whenever the document changes or has a
new comment added we reindex the document and all of its comments for
safety)


chad

On Fri, May 24, 2013 at 6:25 AM, Clinton Gormley wrote:

Chad, when you index your parent or child docs, are you
specifying a routing value? Do you child docs have grandparents?

clint

--
You received this message because you are subscribed to a topic
in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/**to****pic/elasticsearch/**
SQaQ7QcmcKQ/**unsubscribe?hl=en-UShttps://groups.google.com/d/topic/elasticsearch/SQaQ7QcmcKQ/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email t
For more options, visit https://groups.google.com/**grou

ps/opt_out 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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/**grou**
ps/opt_out 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 elasticsearc...@**googlegroups.com.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

--
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.