Setting username weight to 0.0 returns no results

35 views
Skip to first unread message

Jerod Santo

unread,
Dec 6, 2011, 10:13:12 PM12/6/11
to hnse...@googlegroups.com
Hey there-

Looks like my hntrends app is returning all 0s for hit counts these days. I have identified the culprit, but am not quite sure what changed to make it a problem. Somebody had advised me to set the weight for username to 0.0 if I wanted to exclude matches on usernames from the results. That used to work, but now it removes all hits. For instance:


Returns 0 hits while:


Returns 415 hits.

Am I doing it wrong or is this not even how to go about it?

Thanks.

Andres Morey

unread,
Dec 7, 2011, 1:18:43 AM12/7/11
to hnse...@googlegroups.com
Hey Jerod,

Recently we changed the behavior of the weights. By default every field has a weight of 1.0. If you specify a weight on any field then the weights of the other fields are set to 0.0.

The logic behind that decision was that if someone is setting weights they they want more fine grained control over matching/relevancy.

Andres

Jerod Santo

unread,
Dec 7, 2011, 6:26:44 AM12/7/11
to hnse...@googlegroups.com
Okay that makes sense.

Is there a way to accomplish my desired goal of excluding username matches from my results? Would I have to set its weight to 0 and then explicitly set the fields I want to match on back to 1?

-Jerod
(sent on the go)

Andres Morey

unread,
Dec 7, 2011, 8:17:54 AM12/7/11
to hnse...@googlegroups.com, hnse...@googlegroups.com
You can just set the other weights and 'username' will default to zero automatically.

Andres

Jerod Santo

unread,
Dec 7, 2011, 9:03:21 AM12/7/11
to hnse...@googlegroups.com
That did the tricks. Thanks Andres!

Andres Morey

unread,
Dec 7, 2011, 9:31:24 AM12/7/11
to hnse...@googlegroups.com
Awesome!
Reply all
Reply to author
Forward
0 new messages