Issue 1:
Although the startup database folder is always clean, this test fails. I think it has something to do with the underlying lucene index.

@Test
public void quickBenchmark2() {
for(int i=0;i<3000;i++)
batchInserter.createNode(4766131808L+i,new HashMap<>());
batchInserter.shutdown();
}

with

org.neo4j.kernel.impl.store.UnderlyingStorageException: java.io.IOException: Exception in the page eviction thread

at org.neo4j.kernel.impl.store.CommonAbstractStore$1.next(CommonAbstractStore.java:1171)
at org.neo4j.kernel.impl.store.CommonAbstractStore$1.next(CommonAbstractStore.java:1147)
at org.neo4j.unsafe.impl.batchimport.staging.ReadRecordsStep.nextBatchOrNull(ReadRecordsStep.java:85)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep.process(ProducerStep.java:78)
at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep$1.run(ProducerStep.java:56)
Caused by: java.io.IOException: Exception in the page eviction thread
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.assertHealthy(MuninnPageCache.java:654)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.grabFreeAndExclusivelyLockedPage(MuninnPageCache.java:708)
at org.neo4j.io.pagecache.impl.muninn.MuninnPagedFile.grabFreeAndExclusivelyLockedPage(MuninnPagedFile.java:521)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.pageFault(MuninnPageCursor.java:317)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.initiatePageFault(MuninnPageCursor.java:290)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.uncommonPin(MuninnPageCursor.java:271)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.pin(MuninnPageCursor.java:254)
at org.neo4j.io.pagecache.impl.muninn.MuninnReadPageCursor.next(MuninnReadPageCursor.java:60)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.next(MuninnPageCursor.java:121)
at org.neo4j.kernel.impl.store.CommonAbstractStore.readIntoRecord(CommonAbstractStore.java:1026)
at org.neo4j.kernel.impl.store.CommonAbstractStore.access$000(CommonAbstractStore.java:63)
at org.neo4j.kernel.impl.store.CommonAbstractStore$1.next(CommonAbstractStore.java:1166)
... 4 more
Caused by: java.io.IOException: No space left on device
at sun.nio.ch.FileDispatcherImpl.pwrite0(Native Method)
at sun.nio.ch.FileDispatcherImpl.pwrite(FileDispatcherImpl.java:66)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:89)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
at org.neo4j.io.fs.StoreFileChannel.write(StoreFileChannel.java:50)
at org.neo4j.io.fs.StoreFileChannel.writeAll(StoreFileChannel.java:65)
at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.swapOut(SingleFilePageSwapper.java:270)
at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.write(SingleFilePageSwapper.java:435)
at org.neo4j.io.pagecache.impl.muninn.MuninnPage.doFlush(MuninnPage.java:154)
at org.neo4j.io.pagecache.impl.muninn.MuninnPage.flush(MuninnPage.java:142)
at org.neo4j.io.pagecache.impl.muninn.MuninnPage.evict(MuninnPage.java:209)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.evictPage(MuninnPageCache.java:979)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.evictPages(MuninnPageCache.java:937)
at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.continuouslySweepPages(MuninnPageCache.java:863)
at org.neo4j.io.pagecache.impl.muninn.EvictionTask.run(EvictionTask.java:39)
at org.neo4j.io.pagecache.impl.muninn.BackgroundTask.run(BackgroundTask.java:45)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Issue 2:
Hi,

I'd like to have the ability to easily get the start or end note of a relationship in Cypher. I have certain key information about a relationships, which are many (in my case tens thousands) and which all have the same start node.

Example:

start r=rel:transactions(sender_address='KEY')

match n-[r]->()

return n limit 1

This query apparently first gets the list of all qualifying relationships and then outputs the first hit, which is quite slow.

A solution like this would be great:

start r=rel:transactions(sender_address='KEY')

return startNode(r) / return endNode(r)