[GeoNetwork-users] Changing privileges en masse

I did a batch import into GN 2.0.1, and and I’d like to change privileges to visible for all. After connecting to the DB, I issued the following SQL:
INSERT INTO operationallowed (groupid, operationid, metadataid) SELECT 1 groupid, 0 operationid, id metadataid FROM metadata WHERE source = ‘mysource’
This will allow group 1 (1 = Internet[ALL]) to see the metadata (0=Visible) from the chosen source. The table is updated, but the metadata still does not show up when searching for it. However, it shows up in ‘recent additions’ on the main page. I can click on the links there, and view the metadata no problem. When I go in as admin and view the privileges, I can see that they have been updated by the SQL. Clicking ‘Submit’ without changing any of the checkboxes fixes the problem and they become searchable. Can anyone tell me what’s going on here? Is there another way?

Thanks,

Paul

Paul Grzeszczak
GIS Analyst / Programmer
Dept. of Earth Sciences
University of Windsor

Ciao Paul,
privileges information are saved into the database and to the lucene index when you modify them using GeoNetwork; if you change the database outside GeoNetwork you have to tell lucene to reindex the changed metadata; you can either:

1- stop GeoNetwork, delete the lucene indexes inside geonetwork/web/WEB-INF/lucene and start GeoNetwork, so that it automatically rebuild the all the lucene index, or

2- change the lastChangeDate field in the Metadata table for the modified metadata, so that they are reindexed at the next restart (for anyone interested, involved code is org.fao.geonet.kernel.DataManager, line 114)

The "Recent additions" service uses the database and not the lucene index.

        Roberto Giaccio

On 23 Jan 2006, at 22:09, pgrzeszc@anonymised.com wrote:

I did a batch import into GN 2.0.1, and and I'd like to change privileges to visible for all. After connecting to the DB, I issued the following SQL:
INSERT INTO operationallowed (groupid, operationid, metadataid) SELECT 1 groupid, 0 operationid, id metadataid FROM metadata WHERE source = 'mysource'
This will allow group 1 (1 = Internet[ALL]) to see the metadata (0=Visible) from the chosen source. The table is updated, but the metadata still does not show up when searching for it. However, it shows up in 'recent additions' on the main page. I can click on the links there, and view the metadata no problem. When I go in as admin and view the privileges, I can see that they have been updated by the SQL. Clicking 'Submit' without changing any of the checkboxes fixes the problem and they become searchable. Can anyone tell me what's going on here? Is there another way?

Thanks,