lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Hill <lucene-l...@zvents.com>
Subject Maximum Length of String for a Field
Date Mon, 17 Apr 2006 23:11:58 GMT

>Is there maximum length to a string that is analazyed and put into a field?
>IE if the String is 1 billion characters and analyzed, tokenized, and the
>last word in the string only appears once at the end, would searching for
>that last word against that field end with a hit for that document?

Note that I'm relatively new here, too.

But I think the answer to your question is "no", based on 
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexWriter.html#setMaxFieldLength(int)


>public void setMaxFieldLength(int maxFieldLength)
>The maximum number of terms that will be indexed for a single field 
>in a document. This limits the amount of memory required for 
>indexing, so that collections with very large files will not crash 
>the indexing process by running out of memory.
>Note that this effectively truncates large documents, excluding from 
>the index terms that occur further in the document. If you know your 
>source documents are large, be sure to set this value high enough to 
>accomodate the expected size. If you set it to Integer.MAX_VALUE, 
>then the only limit is your memory, but you should anticipate an 
>OutOfMemoryError.
>By default, no more than 10,000 terms will be indexed for a field.
Tom


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


Mime
View raw message