lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Toy <jason...@gmail.com>
Subject Re: how to implement custom fieldNorm score per doc type?
Date Tue, 04 Oct 2011 13:28:06 GMT
Robert,

I think we might have a miscommunication.  The docs that require custom
sorting , of TYPE_ID  = 1, never sort against other types of docs.  They are
always only sorted between other docs of TYPE_ID = 1.  I still need custom
scoring because for this particular doc type though to get the docs in
"proper" order  I just want fieldNorm to be 1.    Since I am not sorting
between  the different types,  does this seem more palatable and if so how
would you do this? I see that there is/used to be queryNorm method, but I'm
unable to override it in DefaultSimilarity subclass.

Jason

On Tue, Oct 4, 2011 at 9:00 AM, Robert Muir <rcmuir@gmail.com> wrote:

> On Tue, Oct 4, 2011 at 8:46 AM, Jason Toy <jasontoy@gmail.com> wrote:
> > I have custom scoring written for certain docs.  Since the scoring uses a
> > combination of FieldNorm, td, idf, and other factors, I've modified some
> of
> > those values to fit my scoring needs.  The last issue I have now is that
> I'm
> > not sure how to turn this on for the one doc type where this matters,  I
> > have the docs set by TYPE_ID = 1.
> >
>
> I wouldn't do it this way honestly... instead of having a field
> "field" that is a mixed bag and another field "type_id" that can be 1
> or 2, just use separate fields (field1 and field2) and put your
> content into the correct field depending upon its "type".
>
> I think you will find this denormalization makes it much easier.
>
> --
> lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>


-- 
- sent from my mobile
6176064373

Mime
View raw message