Author: sevein
Date: Mon Aug 13 13:53:53 2012
New Revision: 12083

Log:
Add repository fields when indexing QubitRepository objects, fixes issue 1965.

Modified:
   trunk/lib/QubitSearch.class.php

Modified: trunk/lib/QubitSearch.class.php
==============================================================================
--- trunk/lib/QubitSearch.class.php     Mon Aug 13 10:53:25 2012        (r12082)
+++ trunk/lib/QubitSearch.class.php     Mon Aug 13 13:53:53 2012        (r12083)
@@ -391,6 +391,23 @@
       $field->boost = 8;
       $doc->addField($field);
 
+      // QubitRepository fields
+      if ('QubitRepository' == $actor->className)
+      {
+        foreach ($actor->repositoryI18ns as $repositoryI18n)
+        {
+          if ($actorI18n->culture != $repositoryI18n->culture)
+          {
+            continue;
+          }
+
+          $doc->addField(Zend_Search_Lucene_Field::UnStored('holdings', 
$repositoryI18n->holdings));
+          
$doc->addField(Zend_Search_Lucene_Field::UnStored('collectingPolicies', 
$repositoryI18n->collectingPolicies));
+
+          break;
+        }
+      }
+
       self::getInstance()->getEngine()->getIndex()->addDocument($doc);
     }
   }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to