I was going to use the multilevel index described in
http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.html tie
events to a timeline and write queries to fetch certain types of events
within a date range.
Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
It appears that this is useful for getting all entities within a range
irrespective of the type of entity (determined by relations/properties etc)?
Is there any place that has more documentation/examples/usage for
LuceneTimeline? Would like to understand fully what it's used for before I
go build a multilevel index.
LuceneTimeline is just a tiny abstraction of a normal index where it
indexes entities given timestamps, using the numerical functionality of
Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
Lucene range queries to find the entities within the given timestamps. All
that's in there can be done using normal Lucene backed neo4j indexes. See
https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
> I was going to use the multilevel index described in
> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
> within a date range.
> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
> It appears that this is useful for getting all entities within a range
> irrespective of the type of entity (determined by relations/properties etc)?
> Is there any place that has more documentation/examples/usage for
> LuceneTimeline? Would like to understand fully what it's used for before I
> go build a multilevel index.
Hmm so I can just as well index various events by type, and use this to
fetch them.
Are there any performance gains/losses using one way or the other?
I think initially, for a spike, the LuceneTimeline will be simple enough.
If my timeline grows to be more complicated, I can always introduce the
multilevel index.
Thanks
Luanne
On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson
<matt...@neotechnology.com>wrote:
> LuceneTimeline is just a tiny abstraction of a normal index where it
> indexes entities given timestamps, using the numerical functionality of
> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
> Lucene range queries to find the entities within the given timestamps. All
> that's in there can be done using normal Lucene backed neo4j indexes. See
> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>> I was going to use the multilevel index described in
>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>> within a date range.
>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>> It appears that this is useful for getting all entities within a range
>> irrespective of the type of entity (determined by relations/properties etc)?
>> Is there any place that has more documentation/examples/usage for
>> LuceneTimeline? Would like to understand fully what it's used for before I
>> go build a multilevel index.
> Hmm so I can just as well index various events by type, and use this to
> fetch them.
> Are there any performance gains/losses using one way or the other?
> I think initially, for a spike, the LuceneTimeline will be simple enough.
> If my timeline grows to be more complicated, I can always introduce the
> multilevel index.
> Thanks
> Luanne
> On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson <
> matt...@neotechnology.com> wrote:
>> LuceneTimeline is just a tiny abstraction of a normal index where it
>> indexes entities given timestamps, using the numerical functionality of
>> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
>> Lucene range queries to find the entities within the given timestamps. All
>> that's in there can be done using normal Lucene backed neo4j indexes. See
>> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>>> I was going to use the multilevel index described in
>>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>>> within a date range.
>>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>>> It appears that this is useful for getting all entities within a range
>>> irrespective of the type of entity (determined by relations/properties etc)?
>>> Is there any place that has more documentation/examples/usage for
>>> LuceneTimeline? Would like to understand fully what it's used for before I
>>> go build a multilevel index.
That sounded like a pretty basic Java question, am I right? You construct
the timeline index and keep a reference to it, which you use for adding,
removing and querying the timeline index. Like so:
TimelineIndex index = new LuceneTimeline( db, db.index().forNodes(
"my-timeline" ) );
// and then later on adding to it...
index.add( myNode, timestampForMyNode );
> Mattias, how do I get a handle back to a LuceneTimeline I've created? I
> just see a constructor.
> Thanks
> Luanne
> On Mon, Oct 15, 2012 at 5:08 PM, Luanne Coutinho <
> luanne.couti...@gmail.com> wrote:
>> Hmm so I can just as well index various events by type, and use this to
>> fetch them.
>> Are there any performance gains/losses using one way or the other?
>> I think initially, for a spike, the LuceneTimeline will be simple enough.
>> If my timeline grows to be more complicated, I can always introduce the
>> multilevel index.
>> Thanks
>> Luanne
>> On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson <
>> matt...@neotechnology.com> wrote:
>>> LuceneTimeline is just a tiny abstraction of a normal index where it
>>> indexes entities given timestamps, using the numerical functionality of
>>> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
>>> Lucene range queries to find the entities within the given timestamps. All
>>> that's in there can be done using normal Lucene backed neo4j indexes. See
>>> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>>>> I was going to use the multilevel index described in
>>>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>>>> within a date range.
>>>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>>>> It appears that this is useful for getting all entities within a range
>>>> irrespective of the type of entity (determined by relations/properties etc)?
>>>> Is there any place that has more documentation/examples/usage for
>>>> LuceneTimeline? Would like to understand fully what it's used for before I
>>>> go build a multilevel index.
No, didn't mean that...I can create the index and add stuff to it. Question
is do I need to keep like a static reference to it to be accessed in other
parts of the application? Or if my app and db are shut down, how do I get
back my index (just like you can do db.index().forNodes(regular neo4j
index))? The LuceneTimeline does not seem to be named so not sure how I get
it back to actually query it.
Hope this explanation is clearer :-)
Regards
Luanne
On Wed, Oct 24, 2012 at 11:24 PM, Mattias Persson <matt...@neotechnology.com
> wrote:
> That sounded like a pretty basic Java question, am I right? You construct
> the timeline index and keep a reference to it, which you use for adding,
> removing and querying the timeline index. Like so:
> TimelineIndex index = new LuceneTimeline( db, db.index().forNodes(
> "my-timeline" ) );
> // and then later on adding to it...
> index.add( myNode, timestampForMyNode );
>> Mattias, how do I get a handle back to a LuceneTimeline I've created? I
>> just see a constructor.
>> Thanks
>> Luanne
>> On Mon, Oct 15, 2012 at 5:08 PM, Luanne Coutinho <
>> luanne.couti...@gmail.com> wrote:
>>> Hmm so I can just as well index various events by type, and use this to
>>> fetch them.
>>> Are there any performance gains/losses using one way or the other?
>>> I think initially, for a spike, the LuceneTimeline will be simple
>>> enough. If my timeline grows to be more complicated, I can always introduce
>>> the multilevel index.
>>> Thanks
>>> Luanne
>>> On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson <
>>> matt...@neotechnology.com> wrote:
>>>> LuceneTimeline is just a tiny abstraction of a normal index where it
>>>> indexes entities given timestamps, using the numerical functionality of
>>>> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
>>>> Lucene range queries to find the entities within the given timestamps. All
>>>> that's in there can be done using normal Lucene backed neo4j indexes. See
>>>> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>>>>> I was going to use the multilevel index described in
>>>>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>>>>> within a date range.
>>>>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>>>>> It appears that this is useful for getting all entities within a range
>>>>> irrespective of the type of entity (determined by relations/properties etc)?
>>>>> Is there any place that has more documentation/examples/usage for
>>>>> LuceneTimeline? Would like to understand fully what it's used for before I
>>>>> go build a multilevel index.
> No, didn't mean that...I can create the index and add stuff to it.
> Question is do I need to keep like a static reference to it to be accessed
> in other parts of the application? Or if my app and db are shut down, how
> do I get back my index (just like you can do db.index().forNodes(regular
> neo4j index))? The LuceneTimeline does not seem to be named so not sure how
> I get it back to actually query it.
> Hope this explanation is clearer :-)
Now it's crystal clear, thanks. So... a LuceneTimeline has no state of its
own, it's merely a wrapper around a Lucene backed
org.neo4j.graphdb.index.Index hence it's perfectly fine to create new
instances over time. Even one per add/remove/query should work.
> On Wed, Oct 24, 2012 at 11:24 PM, Mattias Persson <
> matt...@neotechnology.com> wrote:
>> That sounded like a pretty basic Java question, am I right? You construct
>> the timeline index and keep a reference to it, which you use for adding,
>> removing and querying the timeline index. Like so:
>> TimelineIndex index = new LuceneTimeline( db, db.index().forNodes(
>> "my-timeline" ) );
>> // and then later on adding to it...
>> index.add( myNode, timestampForMyNode );
>>> Mattias, how do I get a handle back to a LuceneTimeline I've created? I
>>> just see a constructor.
>>> Thanks
>>> Luanne
>>> On Mon, Oct 15, 2012 at 5:08 PM, Luanne Coutinho <
>>> luanne.couti...@gmail.com> wrote:
>>>> Hmm so I can just as well index various events by type, and use this to
>>>> fetch them.
>>>> Are there any performance gains/losses using one way or the other?
>>>> I think initially, for a spike, the LuceneTimeline will be simple
>>>> enough. If my timeline grows to be more complicated, I can always introduce
>>>> the multilevel index.
>>>> Thanks
>>>> Luanne
>>>> On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson <
>>>> matt...@neotechnology.com> wrote:
>>>>> LuceneTimeline is just a tiny abstraction of a normal index where it
>>>>> indexes entities given timestamps, using the numerical functionality of
>>>>> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
>>>>> Lucene range queries to find the entities within the given timestamps. All
>>>>> that's in there can be done using normal Lucene backed neo4j indexes. See
>>>>> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>>>>>> I was going to use the multilevel index described in
>>>>>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>>>>>> within a date range.
>>>>>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>>>>>> It appears that this is useful for getting all entities within a
>>>>>> range irrespective of the type of entity (determined by
>>>>>> relations/properties etc)?
>>>>>> Is there any place that has more documentation/examples/usage for
>>>>>> LuceneTimeline? Would like to understand fully what it's used for before I
>>>>>> go build a multilevel index.
>> No, didn't mean that...I can create the index and add stuff to it.
>> Question is do I need to keep like a static reference to it to be accessed
>> in other parts of the application? Or if my app and db are shut down, how
>> do I get back my index (just like you can do db.index().forNodes(regular
>> neo4j index))? The LuceneTimeline does not seem to be named so not sure how
>> I get it back to actually query it.
>> Hope this explanation is clearer :-)
> Now it's crystal clear, thanks. So... a LuceneTimeline has no state of its
> own, it's merely a wrapper around a Lucene backed
> org.neo4j.graphdb.index.Index hence it's perfectly fine to create new
> instances over time. Even one per add/remove/query should work.
>> Regards
>> Luanne
>> On Wed, Oct 24, 2012 at 11:24 PM, Mattias Persson <
>> matt...@neotechnology.com> wrote:
>>> That sounded like a pretty basic Java question, am I right? You
>>> construct the timeline index and keep a reference to it, which you use for
>>> adding, removing and querying the timeline index. Like so:
>>> TimelineIndex index = new LuceneTimeline( db, db.index().forNodes(
>>> "my-timeline" ) );
>>> // and then later on adding to it...
>>> index.add( myNode, timestampForMyNode );
>>>> Mattias, how do I get a handle back to a LuceneTimeline I've created? I
>>>> just see a constructor.
>>>> Thanks
>>>> Luanne
>>>> On Mon, Oct 15, 2012 at 5:08 PM, Luanne Coutinho <
>>>> luanne.couti...@gmail.com> wrote:
>>>>> Hmm so I can just as well index various events by type, and use this
>>>>> to fetch them.
>>>>> Are there any performance gains/losses using one way or the other?
>>>>> I think initially, for a spike, the LuceneTimeline will be simple
>>>>> enough. If my timeline grows to be more complicated, I can always introduce
>>>>> the multilevel index.
>>>>> Thanks
>>>>> Luanne
>>>>> On Mon, Oct 15, 2012 at 4:49 PM, Mattias Persson <
>>>>> matt...@neotechnology.com> wrote:
>>>>>> LuceneTimeline is just a tiny abstraction of a normal index where it
>>>>>> indexes entities given timestamps, using the numerical functionality of
>>>>>> Lucene (and inherently the Lucene backed neo4j indexes). Also querying uses
>>>>>> Lucene range queries to find the entities within the given timestamps. All
>>>>>> that's in there can be done using normal Lucene backed neo4j indexes. See
>>>>>> https://github.com/neo4j/community/blob/master/lucene-index/src/main/...
>>>>>>> I was going to use the multilevel index described in
>>>>>>> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.htm... events to a timeline and write queries to fetch certain types of events
>>>>>>> within a date range.
>>>>>>> Noticed that there is a LuceneTimeline in org.neo4.index.lucene.
>>>>>>> It appears that this is useful for getting all entities within a
>>>>>>> range irrespective of the type of entity (determined by
>>>>>>> relations/properties etc)?
>>>>>>> Is there any place that has more documentation/examples/usage for
>>>>>>> LuceneTimeline? Would like to understand fully what it's used for before I
>>>>>>> go build a multilevel index.