lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (JIRA)" <>
Subject [jira] Updated: (LUCENE-1084) increase default maxFieldLength?
Date Thu, 17 Jan 2008 18:36:42 GMT


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

   writer = new IndexWriter(index, new StandardAnalyzer(), create, 

That is, should the demo use Integer.MAX_VALUE instead of 1,000,000 for the maximum field

> increase default maxFieldLength?
> --------------------------------
>                 Key: LUCENE-1084
>                 URL:
>             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:
For additional commands, e-mail:

View raw message