Intersection between any documents

I'm trying to wrap my head around this but it may not be possible due to
the nature of ES.

I have an index of appointments with start time, end time, location and
participants. I'd like to search for *any *appointments that have
overlapping start and end times at the same location.

I understand that this is in essence a relationship between an index and
itself and that it is asking ES to query each document against every other
document.

Is anything like this even possible? Hopefully someone can point me in the
right direction.

Thanks.

--
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/a2cd366e-554c-41d5-9134-27a578c778c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You could do a terms filter on the location along with a range filter query
for the period you are after.
That's probably the closest thing.

On 18 March 2015 at 06:34, Phil philtre.misc@gmail.com wrote:

I'm trying to wrap my head around this but it may not be possible due to
the nature of ES.

I have an index of appointments with start time, end time, location and
participants. I'd like to search for *any *appointments that have
overlapping start and end times at the same location.

I understand that this is in essence a relationship between an index and
itself and that it is asking ES to query each document against every other
document.

Is anything like this even possible? Hopefully someone can point me in the
right direction.

Thanks.

--
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/a2cd366e-554c-41d5-9134-27a578c778c9%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a2cd366e-554c-41d5-9134-27a578c778c9%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/CAEYi1X9C-otNrS_VkW2g7M7FVEvtZv3dpv4rM2u5EC4UaJykAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Unfortunately there is no location/period to filter on. It's looking for
any date range overlapping with any other date range at the same location.

I'm working on aggregating terms on location, then date histogram time
"windows" between start and end. Any with doc_count > 1 would be
overlapping.

On Wednesday, 18 March 2015 12:42:49 UTC-4, Mark Walkom wrote:

You could do a terms filter on the location along with a range filter
query for the period you are after.
That's probably the closest thing.

On 18 March 2015 at 06:34, Phil <philtr...@gmail.com <javascript:>> wrote:

I'm trying to wrap my head around this but it may not be possible due to
the nature of ES.

I have an index of appointments with start time, end time, location and
participants. I'd like to search for *any *appointments that have
overlapping start and end times at the same location.

I understand that this is in essence a relationship between an index and
itself and that it is asking ES to query each document against every other
document.

Is anything like this even possible? Hopefully someone can point me in
the right direction.

Thanks.

--
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:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a2cd366e-554c-41d5-9134-27a578c778c9%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a2cd366e-554c-41d5-9134-27a578c778c9%40googlegroups.com?utm_medium=email&utm_source=footer
.
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/fc78b54f-7034-4a0a-a793-59f39498894e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.