Author: david
Date: Tue Sep 6 14:18:28 2011
New Revision: 9672
Log:
Make digitalObject ZSL field searchable. Cosmetic changes to field name and
value to make it more human readable
Modified:
trunk/apps/qubit/modules/search/templates/indexSuccess.php
trunk/lib/search/QubitSearch.class.php
Modified: trunk/apps/qubit/modules/search/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/search/templates/indexSuccess.php Tue Sep 6
13:33:06 2011 (r9671)
+++ trunk/apps/qubit/modules/search/templates/indexSuccess.php Tue Sep 6
14:18:28 2011 (r9672)
@@ -19,7 +19,7 @@
<?php $doc = $hit->getDocument(); ?>
<div class="clearfix search-results <?php echo 0 == @++$row % 2 ? 'even'
: 'odd' ?>">
- <?php if ($doc->digitalObject): ?>
+ <?php if ('true' == $doc->hasDigitalObject): ?>
<?php if (null == $doc->do_mediaTypeId): ?>
<?php echo
link_to(image_tag(QubitDigitalObject::getGenericRepresentation($doc->do_mediaTypeId,
QubitTerm::THUMBNAIL_ID)->getFullPath(), array('alt' => $doc->title)),
array('slug' => $doc->slug, 'module' => 'informationobject')) ?>
<?php elseif (QubitTerm::AUDIO_ID == $doc->do_mediaTypeId): ?>
Modified: trunk/lib/search/QubitSearch.class.php
==============================================================================
--- trunk/lib/search/QubitSearch.class.php Tue Sep 6 13:33:06 2011
(r9671)
+++ trunk/lib/search/QubitSearch.class.php Tue Sep 6 14:18:28 2011
(r9672)
@@ -421,7 +421,7 @@
// Digital object information
if ($digitalObject = $informationObject->getDigitalObject())
{
- $doc->addField(Zend_Search_Lucene_Field::UnIndexed('digitalObject',
true));
+ $doc->addField(Zend_Search_Lucene_Field::Keyword('hasDigitalObject',
'true'));
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('do_mediaTypeId',
$digitalObject->mediaTypeId));
@@ -436,7 +436,7 @@
}
else
{
- $doc->addField(Zend_Search_Lucene_Field::UnIndexed('digitalObject',
null));
+ $doc->addField(Zend_Search_Lucene_Field::Keyword('hasDigitalObject',
'false'));
}
// Title
--
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.