[ https://issues.apache.org/jira/browse/LUCENE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Rowe updated LUCENE-1084: -------------------------------- Attachment: LUCENE-1084.patch Attaching a patch implementing my suggestion to add an explicit maximum field length parameter to IndexWriter constructors. I named the inner class MaxFieldLength instead of FieldLength. The patch deprecates the pre-existing constructors, and adds a new constructor with the added parameter for each of the pre-existing constructors. As a result, the patch could be applied to the trunk as soon as 2.3 has been released; the deprecated pre-existing constructors would then be removed as part of the 3.0 release. The patch also replaces all IndexWriter constructor calls in the tree with their equivalents taking the explicit max field length parameter. (I excluded IndexModifier, because it is already scheduled for removal as part of the 3.0 release.) I see that in o.a.l.demo.IndexHTML.java, the max field length is set significantly above the current default limit: 71: writer = new IndexWriter(index, new StandardAnalyzer(), create); 72: writer.setMaxFieldLength(1000000); Should the above two lines be replaced with the following? (I did *not* do this in the attached patch): writer = new IndexWriter(index, new StandardAnalyzer(), create, IndexWriter.MaxFieldLength.UNLIMITED); That is, should the demo use Integer.MAX_VALUE instead of 1,000,000 for the maximum field length? > increase default maxFieldLength? > -------------------------------- > > Key: LUCENE-1084 > URL: https://issues.apache.org/jira/browse/LUCENE-1084 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Affects Versions: 2.2 > Reporter: Daniel Naber > Assignee: Michael McCandless > Fix For: 3.0 > > Attachments: LUCENE-1084.patch > > > To my understanding, Lucene 2.3 will easily index large documents. So > shouldn't we get rid of the 10,000 default limit for the field length? 10,000 > isn't that much and as Lucene doesn't have any error logging by default, this > is a common problem for users that is difficult to debug if you don't know > where to look. > A better new default might be Integer.MAX_VALUE. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]