Java translation problem

2009-10-09 Thread tommy c
I'm trying to translate a java lucene indexer to clojure. This java line is bothersome: writer = new IndexWriter(dir, new SimpleAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED); I'm doing: (import '(org.apache.lucene.index IndexWriter)) (def index-writer (new IndexWriter dir (new SimpleAn

Re: Java translation problem

2009-10-10 Thread tommy c
Thanks guys. the import was necessary (import '(org.apache.lucene.index IndexWriter IndexWriter $MaxFieldLength)) and IndexWriter$MaxFieldLength/UNLIMITED was the correct reference. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

reading a range from a large file

2009-10-24 Thread tommy c
I have a huge file(>900MB) that I would like to read/process in chunks. In clojure, i can grab the first n lines nicely: (with-open [r (reader "FILE")] (str-join ", " (take n (line-seq r How can i grab the first n lines starting from an line offset? ex, grab lines 5 to 10 rather than just t