That's great thanks, worked like a charm :) using:
IndexBrowse ib = new IndexBrowse(context);
ib.indexItem(Item.find(context, itemId));
Maybe not the best way with error checking, but as a start it's all good :D
Regards,
Adam
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of helix84
Sent: 06 January 2014 16:43
To: Adam Rousell
Cc: [email protected]
Subject: Re: [Dspace-tech] Updating the sort index values after changing a
resource metadata value
On Mon, Jan 6, 2014 at 5:28 PM, Adam Rousell <[email protected]>
wrote:
> On our DSpace implementation we have developed a method that allows
> users to give items a rating (1-5 stars). This value is stored in the
> metadata against an item and is created/updated outside of the Item
> class (if the value was updated using the Item class then there are
> issues to do with authorisation as we want anyone to be able to rate
> the item) so we basically use an SQL against the metadata value table
> to update it through the DatabaseManager. Now, we also want to be able
> to sort the browse items by this rating value, which I have got
> working except for one problem - When the metadata is updated in this
> way the bi_item table does not get updated to reflect the new value.
> Is there some command that I am missing to tell the system to update this?
Hi Adam,
bi_ stands for browse index. Browse indices in DSpace up to and including 3.x
are updated using the index-update command. In DSpace 4.0, these indices are
stored in Solr by default and are updated by update-discovery-index. There are
two things you'll be interested to hear - 1) these are just launchers for Java
classes, so you may want to execute the methods directly instead of going via
shell (see the mapping in launcher.xml). 2) Check out the -i parameter to
update the index for only a single handle.
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&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