I'm sorry about the noise.

Here it comes the patch.

Ferran
BibIndex: allow second indicator of 856 to be any value

 * Second indicator of 856 can have several values, not just _
   (http://www.loc.gov/marc/bibliographic/bd856.html)

---
 modules/bibindex/lib/bibindex_engine.py |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: cds-invenio/modules/bibindex/lib/bibindex_engine.py
===================================================================
--- cds-invenio.orig/modules/bibindex/lib/bibindex_engine.py	2009-12-03 13:09:53.000000000 +0100
+++ cds-invenio/modules/bibindex/lib/bibindex_engine.py	2009-12-03 13:10:24.000000000 +0100
@@ -463,7 +463,7 @@
 def get_nothing_from_phrase(phrase, stemming_language=None):
     """ A dump implementation of get_words_from_phrase to be used when
     when a tag should not be indexed (such as when trying to extract phrases from
-    8564_u)."""
+    8565%u)."""
     return []
 
 
@@ -768,7 +768,7 @@
         @param table_name_pattern: i.e. idxWORD%02dF or idxPHRASE%02dF
         @parm default_get_words_fnc: the default function called to extract words from a metadata
         @param tag_to_words_fnc_map: a mapping to specify particular function to
-        extract words from particular metdata (such as 8564_u)
+        extract words from particular metdata (such as 8565%u)
         """
         self.index_id = index_id
         self.tablename = table_name_pattern % index_id
@@ -1475,7 +1475,7 @@
     if task_get_option("cmd") == "check":
         wordTables = get_word_tables(task_get_option("windex"))
         for index_id, index_tags in wordTables:
-            wordTable = WordTable(index_id, index_tags, 'idxWORD%02dF', get_words_from_phrase, {'8564_u': get_words_from_fulltext})
+            wordTable = WordTable(index_id, index_tags, 'idxWORD%02dF', get_words_from_phrase, {'8565%u': get_words_from_fulltext})
             _last_word_table = wordTable
             wordTable.report_on_table_consistency()
             task_sleep_now_if_required(can_stop_too=True)
@@ -1485,7 +1485,7 @@
     if task_get_option("cmd") == "check":
         wordTables = get_word_tables(task_get_option("windex"))
         for index_id, index_tags in wordTables:
-            wordTable = WordTable(index_id, index_tags, 'idxPHRASE%02dF', get_phrases_from_phrase, {'8564_u': get_nothing_from_phrase}, False)
+            wordTable = WordTable(index_id, index_tags, 'idxPHRASE%02dF', get_phrases_from_phrase, {'8565%u': get_nothing_from_phrase}, False)
             _last_word_table = wordTable
             wordTable.report_on_table_consistency()
             task_sleep_now_if_required(can_stop_too=True)
@@ -1499,7 +1499,7 @@
         if task_get_option("reindex"):
             reindex_prefix = "tmp_"
             init_temporary_reindex_tables(index_id, reindex_prefix)
-        wordTable = WordTable(index_id, index_tags, reindex_prefix + 'idxWORD%02dF', get_words_from_phrase, {'8564_u': get_words_from_fulltext})
+        wordTable = WordTable(index_id, index_tags, reindex_prefix + 'idxWORD%02dF', get_words_from_phrase, {'8565%u': get_words_from_fulltext})
         _last_word_table = wordTable
         wordTable.report_on_table_consistency()
         try:
@@ -1555,7 +1555,7 @@
         task_sleep_now_if_required(can_stop_too=True)
 
         # Let's work on phrases now
-        wordTable = WordTable(index_id, index_tags, reindex_prefix + 'idxPHRASE%02dF', get_phrases_from_phrase, {'8564_u': get_nothing_from_phrase}, False)
+        wordTable = WordTable(index_id, index_tags, reindex_prefix + 'idxPHRASE%02dF', get_phrases_from_phrase, {'8565%u': get_nothing_from_phrase}, False)
         _last_word_table = wordTable
         wordTable.report_on_table_consistency()
         try:

Reply via email to