lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Case Sensitivity
Date Thu, 28 Aug 2008 16:54:39 GMT
So in other words, it *is* possible to have the field both tokenized and its norms omitted?


Otis 
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Karl Wettin <karl.wettin@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Thursday, August 28, 2008 5:52:54 AM
> Subject: Re: Case Sensitivity
> 
> 
> 28 aug 2008 kl. 11.46 skrev Andrzej Bialecki:
> 
> > Karl Wettin wrote:
> >> 28 aug 2008 kl. 10.58 skrev Dino Korah:
> >>> Document doc = new Document();
> >>> Field f = new Field("body", bodyText, Field.Store.NO,
> >>> Field.Index.TOKENIZED);
> >>> f.setOmitNorms(true);
> >>>
> >>> Would that be equivalent to
> >>>
> >>> Document doc = new Document();
> >>> Field f = new Field("body", bodyText,  
> >>> Field.Store.NO ,Field.Index.NO_NORMS);
> >>>
> >>> And Field.Index.TOKENIZED has no effect after  
> >>> f.setOmitNorms(true); ?
> >> Yes, those two have the same effect.
> >
> > I don't think so - these two scenarios are different.
> >
> > When you create a Field using Index.NO_NORMS, the constructor makes  
> > sure that:
> >      isIndexed = true;
> >      isTokenized = false;
> >      omitNorms = true;
> >
> > When you create a Field using Index.TOKENIZED, the constructor sets  
> > these flags:
> >      isIndexed = true;
> >      isTokenized = true;
> >
> > Then, when you call setOmitNorms(true), it does NOT affect  
> > isTokenized, it sets only omitNorms. So the flags are set now like  
> > this:
> >      isIndexed = true;
> >      isTokenized = true;
> >      omitNorms = true;
> >
> > The end result of processing such a field is (I believe)  
> > conceptually equivalent to adding as many Fields as there are  
> > tokens, each with omitNorms=true.
> 
> Oh, you are of course right, I was too quick to read. Sorry.
> 
> 
>        karl
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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