Thanks for the responses, both. Actually I think I've just stumbled on a
good strategy after considering your approaches and reading the linked
discussions.

For reference, in my case I was deleting a metadatavalue record with an
invalid dc.date.issued value (here "s.f." is Spanish for sin fecha / no
date, which of course isn't ISO 8601!). In PostgreSQL:

# select * from metadatavalue where text_value='s.f.';
# delete from metadatavalue where text_value='s.f.' and resource_id='57762';
# select handle from item, handle where handle.resource_id = item.item_id
AND item.item_id = '57762';

Then removing the item from the index (using the handle from above) and
starting regular index update:

$ [dspace]/bin/dspace index-discovery -r 10568/56338
$ [dspace]/bin/dspace index-discovery

The DSpace logs confirm that the item was removed and then added back to
the index, and that could work for a collection or community if I needed
it. This is a much more acceptable strategy than waiting a few hours for a
full re-index, and now I understand the SQL / Solr relationship better. :)

Thanks for the discussion!

Alan

On Mon, Aug 17, 2015 at 10:27 PM Terry Brady <terry.br...@georgetown.edu>
wrote:

> Alan,
>
> If your changes can be scoped to a specific community or collection, we
> have a process that will re-index a collection/community.
>
> We have present the user with a form that allows them to select either a
> community or a collection.  We end up with 2 parameters
>
>    - "comm" or "coll"
>    - database id for the community or collection
>
> The following script deletes the discovery entries for that community or
> collection.  It then runs index-discovery which rebuilds the missing
> entries.
>
>    -
>    
> https://github.com/Georgetown-University-Libraries/batch-tools/blob/master/bin-src/dspaceBatch.sh#L282-L291
>
> Background thread:
> http://sourceforge.net/p/dspace/mailman/message/31838611/
>
> Terry
>
>
> On Mon, Aug 17, 2015 at 6:57 AM, Alan Orth <alan.o...@gmail.com> wrote:
>
>> Hi,
>>
>> When I edit items in the web user interface, either by batch CSV upload
>> or one by one in "Edit this Item", DSpace updates the Discovery indexes for
>> the item(s) in question. Sometimes I have to make changes in SQL directly,
>> like to delete empty metadatavalues, and as far as I know the only way to
>> capture those changes in the Solr indexes is to perform an `index-discovery
>> -b`, but that takes *hours* for our repository of 50,000 items (despite
>> having an SSD and plenty of RAM on our Linode-powered VPS!).
>>
>> Is there a way to force the updating of a specific handle's Solr indexes?
>>
>> Thanks,
>>
>> Alan
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Terry Brady
> Applications Programmer Analyst
> Georgetown University Library Information Technology
> https://www.library.georgetown.edu/lit/code
> 425-298-5498 (Seattle, WA)
>
------------------------------------------------------------------------------
_______________________________________________
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