Hi, quick answer :

try (IndexWriter$MaxFieldLength/UNLIMITED)



HTH

-- 
Laurent

2009/10/9 tommy c <wheels...@gmail.com>

>
> 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 SimpleAnalyzer) true
> (.UNLIMITED (.MaxFieldLength IndexWriter))))
>
> The error:
> java.lang.IllegalArgumentException: No matching field found:
> MaxFieldLength for class java.lang.Class (indexer.clj:0)
>
> This is how MaxFieldLength is defined in Lucene:
>    public static final MaxFieldLength UNLIMITED  = new MaxFieldLength
> ("UNLIMITED", Integer.MAX_VALUE);
>
>
> Why does the compiler think IndexWriter is a Class and not a
> org.apache.lucene.index.IndexWriter object?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to