Hi Anthony,

2014-04-08 4:03 GMT+09:00 Anthony Petryk <anthony.pet...@uottawa.ca>:
> In DSpace 4.0 JSPUI, the search results page includes “hits” from
> Communities and Collections in addition to Items.  However, some of these
> Communities and Collections only appear on the second and third page of
> results (possibly because they’re ranked lower in relevance than some
> Items).  Is there a way of getting them all to float to the top?  Is it
> possible to remove them from the results list altogether?

You can remove them with setting the following <property> element to
"default configuration settings for discovery" and "Homepage specific
configuration settings for discovery.in [dspace]/config/spring/api/discovery.xml
In the default configuration setting this property is set as comment already.

<property name="defaultFilterQueries">
  <list>
    <value>search.resourcetype:2</value>
  </list>
</property>

This setting removes communities and collections results in XMLUI but
there is a bug in JSPUI and does not remove them. I made a PR and
created a ticket in JIRA. Please refer to the following URL,

https://jira.duraspace.org/browse/DS-1974

> Also, is it possible to configure which metadata fields are indexed for
> Communities and Collections?  It seems that the License field is indexed,
> which we don’t want.

You can omit the license data with setting "dc.rights.license" as a value
of <property name="toIgnoreMetadataFields"> also in
[dspace]/config/spring/api/discovery.xml
and reindex discovery index.

The following is a diff with these two setting.

--- discovery.xml.org 2014-04-19 15:55:58.082480988 +0900
+++ discovery.xml 2014-04-19 19:06:37.579309730 +0900
@@ -76,6 +76,8 @@
                         <!--<value>dc.description.tableofcontents</value>-->
                         <!--Copyright text-->
                         <value>dc.rights</value>
+                        <!--License   text-->
+                        <value>dc.rights.license</value>
                         <!--Collection name-->
                         <!--<value>dc.title</value>-->
                     </list>
@@ -124,12 +126,12 @@
             </bean>
         </property>
         <!--Any default filter queries, these filter queries will be
used for all queries done by discovery for this configuration-->
-        <!--<property name="defaultFilterQueries">-->
-            <!--<list>-->
+        <property name="defaultFilterQueries">
+            <list>
                 <!--Only find items-->
-                <!--<value>search.resourcetype:2</value>-->
-            <!--</list>-->
-        <!--</property>-->
+                <value>search.resourcetype:2</value>
+            </list>
+        </property>
         <!--The configuration for the recent submissions-->
         <property name="recentSubmissionConfiguration">
             <bean
class="org.dspace.discovery.configuration.DiscoveryRecentSubmissionsConfiguration">
@@ -212,6 +214,12 @@
                 <ref bean="searchFilterIssued" />
             </list>
         </property>
+        <property name="defaultFilterQueries">
+            <list>
+                <!--Only find items-->
+                <value>search.resourcetype:2</value>
+            </list>
+        </property>
         <!--The sort filters for the discovery search (same as
defaultConfiguration above)-->
         <property name="searchSortConfiguration">
             <bean
class="org.dspace.discovery.configuration.DiscoverySortConfiguration">


Regards,
Keiji Suzuki
Ebetsu, Japan

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to