You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jeff Rodenburg <je...@gmail.com> on 2005/10/26 08:50:29 UTC

MaxFieldLength or MaxFields?

I'm considering building out an index that will flatten a data structure,
such that some Document "A" will have Fields 1,2 and 3.
Fields 1 and 2 are indexed/tokenized field. Field 3 is indexed, and will
contain many discrete values (up to possibly 5000).

Couple of questions:
1. Does the DEFAULT_MAX_FIELD_LENGTH on IndexWriter come into play for Field
3? Field 3 values are added to the document individually, there's just a
bunch of them.
2. Is MaxFieldLength a consideration for this?

Any guidance before I go through the trouble of building the index would be
greatly appreciated.

thanks,
- j

Re: MaxFieldLength or MaxFields?

Posted by Jeff Rodenburg <je...@gmail.com>.
thanks Erik

On 10/26/05, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>
>
> On 26 Oct 2005, at 02:50, Jeff Rodenburg wrote:
> > I'm considering building out an index that will flatten a data
> > structure,
> > such that some Document "A" will have Fields 1,2 and 3.
> > Fields 1 and 2 are indexed/tokenized field. Field 3 is indexed, and
> > will
> > contain many discrete values (up to possibly 5000).
>
>
> > Couple of questions:
> > 1. Does the DEFAULT_MAX_FIELD_LENGTH on IndexWriter come into play
> > for Field
> > 3? Field 3 values are added to the document individually, there's
> > just a
> > bunch of them.
>
> No. The max field length only comes into play for tokenized
> (analyzed) fields.
>
> > 2. Is MaxFieldLength a consideration for this?
>
> The default is 10,000, so you're safe :)
>
> From IndexWriter.java:
> public final static int DEFAULT_MAX_FIELD_LENGTH = 10000;
>
> > Any guidance before I go through the trouble of building the index
> > would be
> > greatly appreciated.
>
> Never be afraid to just try out things. It's easy enough to whip up
> a simple Java program of only a few lines that would exercise this
> sort of thing. A simple for loop adding 5000 identically named non-
> tokenized, indexed fields to a document would prove this to yourself.
>
> And now with Ferret - http://ferret.davebalmain.com/trac/ - the fun
> and lightweight nature of Ruby will allow us to experiment with
> Lucene without even compilation (or suffering Python syntax :).
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: MaxFieldLength or MaxFields?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On 26 Oct 2005, at 02:50, Jeff Rodenburg wrote:
> I'm considering building out an index that will flatten a data  
> structure,
> such that some Document "A" will have Fields 1,2 and 3.
> Fields 1 and 2 are indexed/tokenized field. Field 3 is indexed, and  
> will
> contain many discrete values (up to possibly 5000).


> Couple of questions:
> 1. Does the DEFAULT_MAX_FIELD_LENGTH on IndexWriter come into play  
> for Field
> 3? Field 3 values are added to the document individually, there's  
> just a
> bunch of them.

No.  The max field length only comes into play for tokenized  
(analyzed) fields.

> 2. Is MaxFieldLength a consideration for this?

The default is 10,000, so you're safe :)

 From IndexWriter.java:
   public final static int DEFAULT_MAX_FIELD_LENGTH = 10000;

> Any guidance before I go through the trouble of building the index  
> would be
> greatly appreciated.

Never be afraid to just try out things.  It's easy enough to whip up  
a simple Java program of only a few lines that would exercise this  
sort of thing.  A simple for loop adding 5000 identically named non- 
tokenized, indexed fields to a document would prove this to yourself.

And now with Ferret - http://ferret.davebalmain.com/trac/ - the fun  
and lightweight nature of Ruby will allow us to experiment with  
Lucene without even compilation (or suffering Python syntax :).

     Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org