Re: Join and Range Queries

2011-07-09 Thread Yonik Seeley
On Sat, Jul 9, 2011 at 8:04 PM, Lance Norskog  wrote:
> Does the Join feature work with Range queries?

Not in any generic manner - joins are based on exact matches of
indexed tokens only.
But if you wanted something specific enough like same year, then you
could index that year for each document and do the join on that (it
would actually be a self join).

You could also get other resolutions by say indexing months...

doc1:
   description:...
   date:May
   close_dates:Apr May Jun

doc2:
  description...
  date: Jun
  close_dates: May Jun Jul

Then to find other events within 1 month of the selected events:
{!join from:date to:close_dates}description:octoberfest

Or to find other events within 2 months:
{!join from:close to:close_dates}description:octoberfest

-Yonik
http://www.lucidimagination.com


> Given a time series of events stored as documents with time ranges, is
> it possible to do a search that finds certain events, and then add
> other documents whose time ranges overlap?
>
> --
> Lance Norskog
> goks...@gmail.com
>


Join and Range Queries

2011-07-09 Thread Lance Norskog
Does the Join feature work with Range queries?

Given a time series of events stored as documents with time ranges, is
it possible to do a search that finds certain events, and then add
other documents whose time ranges overlap?

-- 
Lance Norskog
goks...@gmail.com