Hi Johanne:

 

1)      You need to also add “<ref bean="searchFilterDescriptionJournal" />” 
under “<property name="sidebarFacets">” under the “EdusConfiguration”, or else 
it won’t show up in the sidebar facets for EdusConfiguration. It’ll show up as 
a search filter when searching, but not as a “facet”.

2)      You _cannot_ delete “<ref bean="searchFilterDescriptionJournal" />” 
from “searchFilters” under the “defaultConfiguration”. That’s – what I consider 
to be  – the bug. The bean _must_ be in the “defaultConfiguration”. I think 
it’s very silly, but I have noticed this is necessary for it to work.

 

I imagine the reason why the facet appears on the “EdusConfiguration” after you 
delete it from “defaultConfiguration” is because the indexes are still full. 
Once you re-index the database, the indexes are emptied (because the bean isn’t 
referenced under “defaultConfiguration”) and the sidebar facets disappear.

 

If you keep “<ref bean="searchFilterDescriptionJournal" />” under “<property 
name=" searchFilters ">” for both “defaultConfiguration” and 
“EdusConfiguration”, as well as under “<property name="sidebarFacets">”, you 
should be fine.


So:

 

1)      Add “<ref bean="searchFilterDescriptionJournal" />” to “<property 
name="searchFilters">” under the “defaultConfiguration”

2)      Add “<ref bean="searchFilterDescriptionJournal" />” to “<property 
name="searchFilters">” under the “EdusConfiguration”

3)      Add “<ref bean="searchFilterDescriptionJournal" />” to “<property 
name="sidebarFacets">” under the “EdusConfiguration”

4)      “index-discovery –b”

5)      Restart Tomcat

6)      Note that "searchFilterDescriptionJournal” appears under the search 
filters when doing a search

7)      Note that “searchFilterDescriptionJournal” appears as a sidebar facet 
for the EdusConfiguration

8)      Profit : ) 

 

If you follow those exact steps, you should be fine. I have this working at the 
moment on a DSpace 4.2 instance.

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St, Ultimo, NSW 2007

 

From: Johanne Crête [mailto:johanne.cr...@usherbrooke.ca] 
Sent: Tuesday, 16 September 2014 1:11 AM
To: David Cook; 'Terry Brady'
Cc: dspace-tech@lists.sourceforge.net
Subject: RE: [Dspace-tech] DSPACE: (discovery) Is it possible to show a 
specific sidebarFacets for a specific collection?

 

Hi David,

 

I resume all step that I have to execute to show a specific sidebarFacet for a 
specific collection:

 

1-      I add “<ref bean="searchFilterDescriptionJournal" />” to the 
“searchFilters” under the “defaultConfiguration”

2-      I add “<ref bean="searchFilterDescriptionJournal" />” to the 
“searchFilters” under the “EdusConfiguration”

3-      “index-discovery –b”

4-      I restart the servlet container (Tomcat)

 

RESULT : the sidebarfacet appears for the collection:  “defaultConfiguration” 
and “EdusConfiguration”

 

5-      I delete “<ref bean="searchFilterDescriptionJournal" />” to the 
“searchFilters” under the “defaultConfiguration”

 

RESULT: the sidebarfacet appears on the “EdusConfiguration”, only on the 
specific collection. It’s exactly what I want, but….

 

6-      The problem is here:  if I execute “index-discovery –b” after the step 
5, then I restart the servlet container (Tomcat), the sidebarfacet disappears 
completely!

 

Thanks!

 

______________________________________________________

Johanne Crête

Technicienne en informatique

Service des bibliothèques et archives, Université de Sherbrooke

Sherbrooke (Québec) J1K 2R1 CANADA

 <mailto:johanne.cr...@usherbrooke.ca> johanne.cr...@usherbrooke.ca

(819) 821-8000, poste 66294

 <http://www.facebook.com/BibliothequesUdeS>   
<http://twitter.com/#!/BiblioUdeS>    
<http://www.youtube.com/bibliosusherbrooke> 

 

 

 

De : David Cook [mailto:dc...@prosentient.com.au] 
Envoyé : 11 septembre 2014 20:36
À : Johanne Crête; 'Terry Brady'
Cc : dspace-tech@lists.sourceforge.net 
<mailto:dspace-tech@lists.sourceforge.net> 
Objet : RE: [Dspace-tech] DSPACE: (discovery) Is it possible to show a specific 
sidebarFacets for a specific collection?

 

Hi Johanne:

 

Did you also add  “<ref bean="searchFilterDescriptionJournal" />” to “<property 
name="sidebarFacets">” under “defaultConfiguration”? If so, that would be 
incorrect. 

 

You just need “<ref bean="searchFilterDescriptionJournal" />” under “<property 
name="searchFilters">” under “defaultConfiguration”. 

 

The “EdusConfiguration” that you posted originally looks good. You just need 
the “<ref bean="searchFilterDescriptionJournal" />” under the 
“defaultConfiguration” “searchFilters” for some strange reason. Yes, I do think 
it’s a bug. I’ve already logged it here:  
<https://jira.duraspace.org/browse/DS-2132> 
https://jira.duraspace.org/browse/DS-2132. However, I would appreciate any 
comments you have to add to the bug.

 

So, to re-iterate, you want “<ref bean="searchFilterDescriptionJournal" />” to 
show up under “searchFilters” and “sidebarFacets” for “EdusConfiguration”, and 
ONLY under “searchFilters” for “defaultConfiguration”. After that, 
“index-discovery -b” and restart Tomcat. If I understand you correctly, that 
should show the Description Journal facet only for the handle associated with 
“EdusConfiguration”.

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St, Ultimo, NSW 2007

 

From: Johanne Crête [mailto:johanne.cr...@usherbrooke.ca] 
Sent: Thursday, 11 September 2014 11:58 PM
To: David Cook; 'Terry Brady'
Cc: dspace-tech@lists.sourceforge.net 
<mailto:dspace-tech@lists.sourceforge.net> 
Subject: RE: [Dspace-tech] DSPACE: (discovery) Is it possible to show a 
specific sidebarFacets for a specific collection?

 

Thanks for your answer.

 

Like you wrote, if I add “<ref bean="searchFilterDescriptionJournal" />” to the 
“searchFilters” under the “defaultConfiguration” and then  “index-discovery 
–b”, then restart your servlet container (Tomcat),  the sidebarfacet is show. 
It’s great, but the facet appear on the superior level. 

 

After that, I just delete the add “<ref bean="searchFilterDescriptionJournal" 
/>” to the “searchFilters” under the “defaultConfiguration” WHITOUT 
“index-discovery –b”. The sidebarfacet appear just for the specific collection! 
 Is it a bug? Because, for keeping this sidebarfacet, I can’t “index-discovery 
–b”!

 

______________________________________________________

Johanne Crête

Technicienne en informatique

Service des bibliothèques et archives, Université de Sherbrooke

Sherbrooke (Québec) J1K 2R1 CANADA

 <mailto:johanne.cr...@usherbrooke.ca> johanne.cr...@usherbrooke.ca

(819) 821-8000, poste 66294

 <http://www.facebook.com/BibliothequesUdeS>   
<http://twitter.com/#!/BiblioUdeS>    
<http://www.youtube.com/bibliosusherbrooke> 

 

 

 

De : David Cook [mailto:dc...@prosentient.com.au] 
Envoyé : 9 septembre 2014 03:06
À : 'Terry Brady'; Johanne Crête
Cc : dspace-tech@lists.sourceforge.net 
<mailto:dspace-tech@lists.sourceforge.net> 
Objet : RE: [Dspace-tech] DSPACE: (discovery) Is it possible to show a specific 
sidebarFacets for a specific collection?

 

Hi Johanne:

 

You might need to add “<ref bean="searchFilterDescriptionJournal" />” to the 
“searchFilters” under the “defaultConfiguration” as well.

 

I think it’s a bug, but I’ve noticed that I can only get custom facets to show 
up in non-default configurations, if I have the bean referenced in the 
defaultConfiguration searchFilters.

 

Try following my suggestion, then “index-discovery –b”, then restart your 
servlet container (Tomcat,Jetty,etc). 

 

I bet you that does the trick ;). 

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St, Ultimo, NSW 2007

 

From: Terry Brady [mailto:terry.br...@georgetown.edu] 
Sent: Thursday, 4 September 2014 5:36 AM
To: Johanne Crête
Cc: dspace-tech@lists.sourceforge.net 
<mailto:dspace-tech@lists.sourceforge.net> 
Subject: Re: [Dspace-tech] DSPACE: (discovery) Is it possible to show a 
specific sidebarFacets for a specific collection?

 

Your approach should work.  

 

After making the change, did you restart DSpace and rebuild your discovery 
index?

 

Once you are able to see the new facets, you will also need to update your 
messages.xml with the name of your facet.

    <message 
key="xmlui.Discovery.AbstractSearch.type_descriptionJournal"></message>

    <message 
key="xmlui.ArtifactBrowser.AdvancedSearch.type_descriptionJournal"></message>

    <message 
key="xmlui.ArtifactBrowser.SimpleSearch.filter.descriptionJournal"></message>

 

Terry

 

 

On Wed, Sep 3, 2014 at 11:49 AM, Johanne Crête <johanne.cr...@usherbrooke.ca 
<mailto:johanne.cr...@usherbrooke.ca> > wrote:

I am using DSpace 4.1 and I want to show a specific sidebarFacets for a 
specific collection. I try to do this by adding a new 
"org.dspace.discovery.configuration.DiscoveryConfiguration" in discovery.xml. 
And a new entry key for the specific collection. But, I don't see this 
sidebarFacets. There is another solution to do this?

 

DISCOVERY.XML

----------------------

<bean id="org.dspace.discovery.configuration.DiscoveryConfigurationService" 
class="org.dspace.discovery.configuration.DiscoveryConfigurationService">

        <property name="map">

            <map>

                <!--The map containing all the settings,

                    the key is used to refer to the page (the "site" or a 
community/collection handle)

                    the value-ref is a reference to an identifier of the 
DiscoveryConfiguration format

                    -->

                <!--The default entry, DO NOT REMOVE the system requires this-->

               <entry key="default" value-ref="defaultConfiguration" />

               

               <!--Use site to override the default configuration for the home 
page & default discovery page-->               

               <entry key="site" value-ref="homepageConfiguration" />

                   <entry key="11143/5375" value-ref="EdusConfiguration"/>

            </map>

.... ….

 

<bean id="EdusConfiguration" 
class="org.dspace.discovery.configuration.DiscoveryConfiguration" 
scope="prototype">

        <!--Which sidebar facets are to be displayed-->

        <property name="sidebarFacets">

            <list>

                <ref bean="searchFilterAuthor" />

                <ref bean="searchFilterSubject" />

                <ref bean="searchFilterIssued" />

                <ref bean="searchFilterType" />

                <ref bean="searchFilterDescriptionJournal" />

            </list>

        </property>

        <!--The search filters which can be used on the discovery search page-->

        <property name="searchFilters">

            <list>

                <ref bean="searchFilterTitle" />

                <ref bean="searchFilterAuthor" />

                <ref bean="searchFilterSubject" />

                <ref bean="searchFilterIssued" />

                <ref bean="searchFilterType" />

                <ref bean="searchFilterDescriptionJournal" />

            </list>

        </property>

.... ….

 

<bean id="searchFilterDescriptionJournal" 
class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">

        <property name="indexFieldName" value="descriptionJournal"/>

        <property name="metadataFields">

            <list>

                <value>dc.description.journal</value>

            </list>

        </property>

        <property name="facetLimit" value="10"/>

        <property name="sortOrder" value="COUNT"/>

        <property name="type" value="text"/>

    </bean>

...

 

 

 

 


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net <mailto:DSpace-tech@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette





 

-- 

Terry Brady

Applications Programmer Analyst

Georgetown University Library Information Technology

https://www.library.georgetown.edu/lit/code

425-298-5498 

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
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