A simple fix is to use the IndexHits instance as an Iterable (as
opposed to an Iterator)... by doing that the problem goes away (it's
also ok to use the IndexHits#iterator() method to obtain an Iterator
from it).

  IndexHits hits = indexService.getNodes( "key", "value" );
  for ( Node hit : hits )
  {
      // do something
  }
  hits.close();

That should help. I'll try to upload an updated Apoc 0.5 without this bug in it.

2010/1/22 Nathan Marz <nathan.m...@gmail.com>:
> I am hitting this bug when trying to get a node via LuceneIndexService. I
> found via Google that someone else had hit this (
> http://www.mail-archive.com/user@lists.neo4j.org/msg02439.html) and that
> there is supposedly a fix in a later version. The latest distribution (apoc
> 0.5) seems to exhibit this issue though. Where can I get a version
> containing a fix?
>
>
> --
> Nathan Marz
> Twitter: @nathanmarz
> http://nathanmarz.com
> _______________________________________________
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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

Reply via email to