lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Field.Keyword vs new Field(String, String, true, true, true)
Date Fri, 24 Jun 2005 19:51:40 GMT

On Jun 24, 2005, at 2:46 PM, Yousef Ourabi wrote:

> I have a quick question on the Field class. What is the difference  
> between this:
> for ()
> Field content = new Field("content", contentArray[i], true, true,  
> true, true);
> doc.add(content);
> and this:
> doc.add(Field.Keyword("userAlias", userAlias ));

The boolean parameters line up to these flags, in order: boolean  
store, boolean index, boolean token, boolean storeTermVector

Field.Keyword is the same as true, true, false, false

Your first call stores, indexes, tokenizes, and stores term vectors.   
Your second call is a field that is stored and indexed, but neither  
tokenized nor storing term vectors.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message