Get FeedDocumentBundle to used new addDocumentMap signature, a=chris
Get FeedDocumentBundle to used new addDocumentMap signature, a=chris
diff --git a/src/library/FeedDocumentBundle.php b/src/library/FeedDocumentBundle.php
index a7d95c217..ddad7a6c4 100644
--- a/src/library/FeedDocumentBundle.php
+++ b/src/library/FeedDocumentBundle.php
@@ -254,7 +254,11 @@ class FeedDocumentBundle extends IndexDocumentBundle
$media_category = "news";
$source_stop_regex = "";
}
- $phrase_string = $item[self::TITLE] . " tztzlzngth " .
+ /* r6t was chosen as short enough not to be
+ changed by chargramming, but rare enough
+ that can be used as a useful splitter
+ */
+ $phrase_string = $item[self::TITLE] . " r6t " .
$item[self::DESCRIPTION];
$word_and_qa_lists = PhraseParser::extractPhrasesInLists(
$phrase_string, $lang);
@@ -271,9 +275,9 @@ class FeedDocumentBundle extends IndexDocumentBundle
$meta_ids[] = "safe:all";
}
$title_length = 0;
- if (!empty($word_lists["tztzlzngth"][0])) {
- $title_length = $word_lists["tztzlzngth"][0] + 1;
- unset($word_lists["tztzlzngth"]);
+ if (!empty($word_lists["r6t"][0])) {
+ $title_length = $word_lists["r6t"][0] + 1;
+ unset($word_lists["r6t"]);
}
$num_words = 0;
foreach($word_list as $word => $position_list)
@@ -281,7 +285,7 @@ class FeedDocumentBundle extends IndexDocumentBundle
$num_words += count($position_list);
}
$this->addScoresDocMap($doc_id, $num_words,
- intval($item[self::PUBDATE]), $title_length,
+ intval($item[self::PUBDATE]), 0, $title_length, $title_length,
[], []);
$this->addTermPostingLists(0, $num_words,
$word_list, $meta_ids, $this->doc_map_counter);