On Wed, Jan 19, 2011 at 07:15:11PM -0800, Andi Vajda wrote:
> 
> On Wed, 19 Jan 2011, Eric Hall wrote:
> 
> >On Wed, Jan 19, 2011 at 11:05:28AM -0800, Andi Vajda wrote:
> >>
> >>On Wed, 19 Jan 2011, Eric Hall wrote:
> >>
> >
> >     Tha HashMap()... method works fine for storing the metadata, and luke
> >shows that its there.  Of course getting the metadata back for later
> >comparison/display is also useful, and seemed like it would be
> >straightforward....  Naturally its not working using:
> >
> >     indexMetaDataHashMap = reader.getCommitUserData()
> >
> >     I get an empty hashmap back from the above.  I also tried using:

        Whups, I was wrong, I don't get a HashMap type back, I get
a 'Map' type back (still empty).  I don't know if that makes a difference
or not....


> >
> >     indexCommit = reader.getIndexCommit
> >     indexMetaDataHashMap = indexCommit.getUserData()
> >
> >with the same result (empty hashmap).  Is there a different way to do this?
> >
> 
> If you're getting a HashMap back then the PyLucene side of things is 
> working. If it's empty it could mean that you're doing something wrong 
> Lucene-wise or that you found a bug there. Could it be that you opened the 
> IndexReader before the IndexWriter got committed ? If so, reopen() it after 
> commit or move the opening code. If not, you may want to ask about this on 
> the Lucene user list at java-u...@lucene.apache.org.
> 

        I definitely open the reader after the writer is committed and closed,
they're separate scripts.


                -eric

Reply via email to