Hi Andrea, Thank you for your help.
According to this, filtering with -dc.contributor.author:"Van de Velde, Kevin" should show all the authors but that one, but unfortunately it doesn't work. Oddly, the same query in SOLR web interface works perfectly, excluding those items including that particular author. Checking out solr.log shows that the filter is being applied but with no effect. Another approach I'm currently is to modify the code in static-sidebar-facet.jsp to exclude those authors I don't want to be showed in the facet. It works, but, instead of 5 authors (I have limit=5), for example, it shows 4, as "Van de Velde, Kevin" has been excluded. I don't know where in the code is controlled the resultset sent to static-sidebar-facet.jsp. Any clue about this point? Regards, On Thursday, April 14, 2016 at 3:02:31 PM UTC+2, Andrea Bollini wrote: > > Hi Rafa, > the defaultFilterQueries parameter allows you to limit the result set. The > facet are automatically build upon the result. This mean that in your case > you will have in the author facet only Van de Velde, Kevin and his > coauthors. Also if you write the opposite query, i.e. > -dc.contributor.autor:"Van de Velde, Kevin" > I guess that the result will be not what you expect. No items where Van de > Velde appears as author will be retrieved, so it will be not included in > the author facet but I guess that this is more restrictive than what you > want to achieve. > > To exclude a terms from a facet the only way is to prevent such term to be > indexed and you can do that only customizing the code. > > In DSpace-CRIS you can easily achieve such goal implementing an > EnhancedValueGenerator and using such virtual metadata (i.e. > item.filteredauhor) in the discovery facet configuration > it.cineca.surplus.ir.defaultvalues.EnhancedValuesGenerator > > An example of virtual metadata build using this interface in DSpace-CRIS > and used in discovery can be found here: > > https://github.com/Cineca/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/java/it/cineca/surplus/ir/defaultvalues/FulltextInfoGenerator.java > > https://github.com/Cineca/DSpace/blob/dspace-5_x_x-cris/dspace/config/spring/cris/cris-metadata-enhancers.xml#L167 > > https://github.com/Cineca/DSpace/blob/dspace-5_x_x-cris/dspace/config/spring/api/discovery.xml#L1722 > > Hope this help, > Andrea > > > > > > Il 14/04/2016 10:48, Rafa Carreres ha scritto: > > Hi all, > > In DSpace 5 (Jspui) I have a facet for authors. But, I would like to > exclude certain authors from the facet. > > I have read the documentation ( > <https://wiki.duraspace.org/display/DSDOC5x/Discovery> > https://wiki.duraspace.org/display/DSDOC5x/Discovery) about discovery and > "Adding default filter queries (OPTIONAL)". > > According to this, if I define something like this: > > <property name="defaultFilterQueries"> > <list> > <value>dc.contributor.author: "Van de Velde, Kevin"</value> > </list> > </property> > > Does it mean that I'll only get "Van de Velde, Kevin" in the author facet? > > If so, how could I EXCLUDE a number of author from the facet? What's the > syntax for this? > > > Regards, > > Rafa Carreres > -- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > > > > -- > Andrea Bollini > International Business Development, Deputy Leader > Open Source & Open Standards Strategy, Head > Cineca > > Via dei Tizii, 6 > 00185 Roma, Italy > tel. +39 06 44 486 087 - mob. +39 348 82 77 525http://www.cineca.it > > -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
