get/query methods are only guaranteed to return stuff added before the
latest call to flush() (it's all there in the javadocs). I think that's why
you probably get stale results from get/query. flush(), or at least the
first get/query after a flush() is expensive so try to minimize the number
of calls to flush(). Do this by having different steps in your batch
insertion, f.ex. one where you insert all nodes and index them... call
flush() and then insert relationships.

2011/7/15 sulabh choudhury <sula...@gmail.com>

> Well while inserting the nodes I keep a
> check batchInserter.nodeExists(node1) so I would guess a node would not be
> duplicated.
> Otherwise during a traversal I guess duplicate nodes. IIs there a way I can
> look into the BtachInsert data before I flush so that I can make sure no
> duplicate data has been inserted ?
>
> On Sat, Jun 25, 2011 at 10:49 AM, sulabh choudhury <sula...@gmail.com>wrote:
>
>> Thank you Jim.
>> I will wait for 1.5 and hope it resolves the issue :)
>>
>>
>> On Fri, Jun 24, 2011 at 7:11 PM, sulabh choudhury <sula...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I just downloaded the neo4j-community-1.4.M04. I stumbled into the
>>> java.util.NoSuchElementException: More than one element in
>>> org.neo4j.index.impl.lucene.LuceneIndex$1@396cbd97. First element is
>>> 'Node[3]' and the second element is 'Node[2]'
>>>  at
>>> org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:114)
>>> ~[working_graphGen.jar:na]
>>> at
>>> org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:88)
>>> ~[working_graphGen.jar:na]
>>>  at
>>> org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:32)
>>> ~[working_graphGen.jar:na]
>>>
>>> I looked up and found that this is a bug and has been fixed. I was
>>> wondering if the fix has been incorporated in the latest Milestone or not?
>>>
>>
>>
>>
>> --
>>
>> --
>> Thanks and Regards,
>> Sulabh Choudhury
>>
>>
>
>
> --
>
> --
>
> Thanks and Regards,
> Sulabh Choudhury
>
>
>


-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to