lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Hall <lucene.apache....@darkart.com>
Subject Using IndexWriter.commit(Map<String,String> commitUserData) in pylucene
Date Wed, 19 Jan 2011 18:23:16 GMT
Hello-
	I'd like to store some index metadata using

	IndexWriter.commit(Map<String,String> commitUserData)

	I've set up a python dict with string to string mappings,
but if I use that I get an InvalidArgsError.  Is there a different
python type to use in this call?

	I'm using pylucene-3.0.3-1.

Trimmed/pseudo sample (real code is on a different system):

	import lucene

	indexMetaDataDict = {"one":"two", "three":"four"}
	writer = lucene.IndexWriter(store, analyzer, True, lucene.IndexWriter.MaxFieldLength.UNLIMITED)

	## do document indexing

	writer.optimize()

	writer.commit(indexMetaDataDict)

	writer.close()


	If the "writer.commit(indexMetaDataDict)" line is commented out, it works fine. 
If its not, I get the InvalidArgsError back for that line.



		Thanks much,


		-eric


Mime
View raw message