Hi Frank,

You could look up the log entries in the gsearch log at the two points in time and compare, that may give a clue, and the same thing in the solr log. If you do not find the reason, please send the log extracts.


On 28/01/2013, at 12.20, Frank Feng wrote:

Hi all,

I'm having a problem while updating gsearch/solr in my code. What I want to do is to update solr index via gsearch after updated a data dictionary item referenced by fedora object(s). The data dictionary stores id and text, e.g.

  <dataType id="201" label="Open Response"/>
and in fedora objects, we only store "201", rather than the text. We've modified gsearch xslt to get the label indexed in solr. When I change the data dictionary label, I want to update solr index by calling gsearch REST service. 

The code is shown as follows:

String url = "http://localhost/fedoragsearch/rest?operation=updateIndex&action=fromPid&value=york%3A803799";
HttpMethod method = new GetMethod(url); 

Gsearch returns HTTP 200 and in the response HTML it says "Updated number of index documents: 1" but solr index has not been updated. However, if I copy that url directly to a Browser and hit enter, gsearch updated solr properly.

Any suggestions would be appreciated!


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
Fedora-commons-developers mailing list