Mailing List Archive

r3672 - in trunk: c_src/KinoSearch/Posting c_src/KinoSearch/Search perl/lib/KinoSearch/Posting
Author: creamyg
Date: 2008-07-29 19:03:22 -0700 (Tue, 29 Jul 2008)
New Revision: 3672

Modified:
trunk/c_src/KinoSearch/Posting/RichPosting.c
trunk/c_src/KinoSearch/Posting/ScorePosting.bp
trunk/c_src/KinoSearch/Posting/ScorePosting.c
trunk/c_src/KinoSearch/Search/Compiler.bp
trunk/c_src/KinoSearch/Search/Compiler.c
trunk/c_src/KinoSearch/Search/PhraseScorer.c
trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
Log:
Rename ScorePosting's "impact" member var to "weight" now that there's no more
Weight class to confuse matters.


Modified: trunk/c_src/KinoSearch/Posting/RichPosting.c
===================================================================
--- trunk/c_src/KinoSearch/Posting/RichPosting.c 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Posting/RichPosting.c 2008-07-30 02:03:22 UTC (rev 3672)
@@ -76,7 +76,7 @@
u32_t position = 0;
u32_t *positions;
float *prox_boosts;
- float aggregate_impact = 0.0;
+ float aggregate_weight = 0.0;

/* Decode delta doc. */
doc_code = InStream_Read_C32(instream);
@@ -91,7 +91,7 @@
self->freq = InStream_Read_C32(instream);
}

- /* Read positions, aggregate per-position boost byte into impact. */
+ /* Read positions, aggregate per-position boost byte into weight. */
num_prox = self->freq;
if (num_prox > self->prox_cap) {
self->prox = REALLOCATE(self->prox, num_prox, u32_t);
@@ -104,10 +104,10 @@
position += InStream_Read_C32(instream);
*positions++ = position;
*prox_boosts = norm_decoder[ InStream_Read_U8(instream) ];
- aggregate_impact += *prox_boosts;
+ aggregate_weight += *prox_boosts;
prox_boosts++;
}
- self->impact = aggregate_impact / self->freq;
+ self->weight = aggregate_weight / self->freq;
}

void

Modified: trunk/c_src/KinoSearch/Posting/ScorePosting.bp
===================================================================
--- trunk/c_src/KinoSearch/Posting/ScorePosting.bp 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Posting/ScorePosting.bp 2008-07-30 02:03:22 UTC (rev 3672)
@@ -4,13 +4,13 @@
*
* ScorePosting is the default posting format in KinoSearch. The term-document
* pairing used by MatchPosting is supplemented by additional frequency,
- * position, and impact (weighting) information.
+ * position, and weighting information.
*/
class KinoSearch::Posting::ScorePosting cnick ScorePost
extends KinoSearch::Posting::MatchPosting {

u32_t freq;
- float impact;
+ float weight;
u32_t *prox;
u32_t prox_cap;


Modified: trunk/c_src/KinoSearch/Posting/ScorePosting.c
===================================================================
--- trunk/c_src/KinoSearch/Posting/ScorePosting.c 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Posting/ScorePosting.c 2008-07-30 02:03:22 UTC (rev 3672)
@@ -37,7 +37,7 @@
{
MatchPost_init((MatchPosting*)self, sim);
self->freq = 0;
- self->impact = 0.0;
+ self->weight = 0.0;
self->prox = NULL;
self->prox_cap = 0;
return self;
@@ -119,7 +119,7 @@
{
self->doc_num = doc_num;
self->freq = 0;
- self->impact = 0.0;
+ self->weight = 0.0;
}

void
@@ -139,7 +139,7 @@
self->freq = InStream_Read_C32(instream);

/* Decode boost/norm byte. */
- self->impact = self->sim->norm_decoder[ InStream_Read_U8(instream) ];
+ self->weight = self->sim->norm_decoder[ InStream_Read_U8(instream) ];

/* Read positions. */
num_prox = self->freq;
@@ -233,7 +233,7 @@
: Sim_TF(self->sim, (float)freq) * self->weight;

/* Factor in field-length normalization and doc/field/prox boost. */
- tally->score *= posting->impact;
+ tally->score *= posting->weight;

return tally;
}

Modified: trunk/c_src/KinoSearch/Search/Compiler.bp
===================================================================
--- trunk/c_src/KinoSearch/Search/Compiler.bp 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Search/Compiler.bp 2008-07-30 02:03:22 UTC (rev 3672)
@@ -88,7 +88,7 @@
Sum_Of_Squared_Weights(Compiler *self);

/** Apply a floating point normalization multiplier. For a TermCompiler,
- * this involves multiplying its own impact by the supplied factor;
+ * this involves multiplying its own weight by the supplied factor;
* combining classes such as ORCompiler would apply the factor recursively
* to their children.
*

Modified: trunk/c_src/KinoSearch/Search/Compiler.c
===================================================================
--- trunk/c_src/KinoSearch/Search/Compiler.c 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Search/Compiler.c 2008-07-30 02:03:22 UTC (rev 3672)
@@ -60,7 +60,7 @@
/* factor /= norm_q */
factor = Sim_Query_Norm(self->sim, factor);

- /* impact *= factor */
+ /* weight *= factor */
Compiler_Apply_Norm_Factor(self, factor);
}


Modified: trunk/c_src/KinoSearch/Search/PhraseScorer.c
===================================================================
--- trunk/c_src/KinoSearch/Search/PhraseScorer.c 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/c_src/KinoSearch/Search/PhraseScorer.c 2008-07-30 02:03:22 UTC (rev 3672)
@@ -269,7 +269,7 @@
{
ScorePosting *posting = (ScorePosting*)PList_Get_Posting(self->plists[0]);
self->tally->score = Sim_TF(self->sim, self->phrase_freq)
- * self->weight * posting->impact;
+ * self->weight * posting->weight;
return self->tally;
}


Modified: trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-07-30 01:47:38 UTC (rev 3671)
+++ trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-07-30 02:03:22 UTC (rev 3672)
@@ -19,7 +19,7 @@

{ "KinoSearch::Posting::ScorePosting" => {
make_constructors => ["new"],
- make_getters => [qw( freq impact )],
+ make_getters => [qw( freq weight )],
make_pod => {
synopsis => $synopsis,
}


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits