I would like to restrict MoreLikeThis results to only include items with
anonymous access.
In order to do this, I believe that I will need to modify
org.dspace.discovery.SolrServiceImpl.getRelatedItems()
I have attempted to supply additional parameters to the solr query to
return only items with a read group of "g0", but I have not had success.
As a secondary option, I would like to check the accessibility of results.
NamedList mltResults = (NamedList)
rsp.getResponse().get("moreLikeThis");
if(mltResults != null && mltResults.get(item.getType() + "-" +
item.getID()) != null)
{
SolrDocumentList relatedDocs = (SolrDocumentList)
mltResults.get(item.getType() + "-" + item.getID());
for (Object relatedDoc : relatedDocs)
{
SolrDocument relatedDocument = (SolrDocument)
relatedDoc;
DSpaceObject relatedItem = findDSpaceObject(context,
relatedDocument);
if (relatedItem.getType() == Constants.ITEM)
{
results.add((Item) relatedItem);
}
}
}
What is the proper way to check if a DSpace Item is accessible to anonymous?
--
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
425-298-5498
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette