lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: Calculation of fieldNorm causes irritating effect of sort order
Date Thu, 02 Oct 2008 13:13:44 GMT
Another possibility (and I'm not sure it'll work, but what the heck) would
to create a Filter for active ideas. So rather than add a "category:14"
you create a Category14Filter that you send to the query along with your
+type:idea +alltext:betyg clauses. Now, category won't be considered
in scoring (as I understand it, anyway). See the various
methods that take a Filter.

Filters are pretty inexpensive to create, so if this works for you I'd just
measure the time it takes to create a filter rather than cache them. But
if you do want to cache filters, CachingWrapperFilter may be your friend.

NOTE: I have no clue whether this will do what you want, but I vaguely
remember from wildcard filter discussions that it might. And it would still
allow boosts on the fields you were searching on....


On Thu, Oct 2, 2008 at 8:47 AM, Jimi HullegÄrd <>wrote:

> Erik wrote:
> >
> > On Oct 2, 2008, at 7:39 AM, Jimi HullegÄrd wrote:
> > > Is it possible to disable the lengthNorm calculation for particular
> > > fields?
> >
> > Yes, use Field#setOmitNorms(true) when indexing.
> Ok, thanks. I will just have to look on how to do this the best way (since
> the CMS is handling most of the indexing stuff).
> But apparently this setOmitNorms(true) also disables boosting aswell. That
> is ok for now, but what if we want to use boosting in the future? Is there
> no way to disable the length normalization while still keeping the boost
> calculation?
> /Jimi
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message