lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peyman Faratin <pey...@robustlinks.com>
Subject setting MaxFieldLength in indexwriter
Date Wed, 28 Sep 2011 13:08:00 GMT
Hi

Newbie question. I'm trying to set the max field length property of the indexwriter to unlimited.
The old api is now deprecated but I can't seem to be able to figure out how to set the field
with the new (IndexWriterConfig) API. I've tried IndexWriterConfig.maxFieldLength(Integer.MAX_VALUE)
 but to no avail. Any help would be much appreciated as always




		File file = new File(stopWordsFile);
		Directory dir = NIOFSDirectory.open(new File(indexDir));
		IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_32,
				new StandardAnalyzer(Version.LUCENE_32,file));
		
		conf.maxFieldLength(Integer.MAX_VALUE) ;

		writer = new IndexWriter(dir, conf);

thank you



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message