I have a function to get the path out of a lucene searcher
(documentation at
http://lucene.apache.org/java/2_3_2/api/core/org/apache/lucene/search/IndexSearcher.html).
 The searcher has a Reader, which has a Directory.  The Directory is
abstract, but in my case I know that it's a FSDirectory, so I declare
fsdir, and then use its getFile and getPath.  The actual code I'm
using is:

(defn searcher-path [ #^IndexSearcher searcher ]
  (let [fsdir #^FSDirectory (.. searcher getIndexReader directory)
        path  #^String (.. fsdir getFile getPath) ]
    path))

When I compile this with warn-on-reflection, I get that getField and
getPath cannot be resolved.  Am I doing the hinting wrong somehow?  I
do have imports in my file for IndexSearcher and FSDirectory, so I'm
not sure what I'm missing.

I've also tried this with nested lets, but that didn't help either (as
expected).

--~--~---------~--~----~------------~-------~--~----~
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