Gert,

Well, I finally figured out what I was doing wrong and I feel really foolish that I didn't try this earlier.

The GSearch default Solr configs, @ $FEDORA_HOME/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/index/DemoOnSolr/conf/schema.xml & solrconfig.xml apparently do not copy to the solr directory automatically when running ant, which is why the uniqueKey in schema.xml was set to "id" instead of PID & why the index was failing.

As soon as I copied these files to my Solr conf directory, the index worked.  If I had taken your advice in your last email and checked schema.xml against the DemoOnSolr, I would have found the error sooner.  Luckily, the poking and prodding I did gave me more familiarity with Solr and GSearch, so the time was not wasted.

Thanks again for your guidance.

Cheers,

 
Christopher Curry
Assistant Librarian for Technology / Assistant IT Officer

American Philosophical Society
- Library Hall
105 South Fifth Street
Philadelphia, PA 19106-3386
Tel. (215) 599-4299

ccurry@amphilsoc.org
 
Main Library number: (215) 440-3400
APS website: www.amphilsoc.org



On Tue, Dec 7, 2010 at 8:41 AM, Gert Schmeltz Pedersen <gsp@dtic.dtu.dk> wrote:
Christopher,

Good, with one addition, that I mentioned earlier, the schema.xml file from configDemoOnSolr must be in its place in the solr conf dir, it specifies the PID and dc.* fields. 

Best regards,
Gert

On 06/12/2010, at 22.42, Christopher Curry wrote:

Gert,

Thanks for your quick response.

I do have Solr working on its own (in that I can access the admin interface and get no errors when I do so), but I am not familiar enough with how Solr works at the moment to make the appropriate API calls to index FOXML without using GSearch as an intermediary.  I assumed that GSearch would be able to make the appropriate Solr REST calls as long as I configured GSearch to talk to it correctly; in short, I thought that the only configurations I would need to make to get GSearch using Solr were the following: configure GSearch to use the DemoSolr configs & configure the host and port Solr is running on.  After making these configs, I expected that GSearch would use the DemoSolr configs to create a basic Solr index that I could poke and prod and use as a test case for learning Solr and customizing my own FOXML TO Solr XSLT.

I'll poke around a little more and take a look at the config files you mention.

I need Solr functionality because I want to use the Solr functionality of Islandora.  I'm currently in correspondence with Paul Pound as well and he may be able to point me in the right direction.  Thanks for your time.  I'll let you know how it works out.

On Mon, Dec 6, 2010 at 9:04 AM, Gert Schmeltz Pedersen <gsp@dtic.dtu.dk> wrote:
Christopher,

I think we need to divide and conquer. I would like if you get solr up and running on its own, without any regard to gsearch. So you should be able to index and search by using merely solr rest calls.

Then you must make sure that your index.properties file is correct, esp. fgsindex.operationsImpl, fgsindex.indexBase and fgsindex.indexDir, so that indexing via gsearch finds solr, check both gsearch and solr logs. (Notice, that all the ant script things are just a way to produce the runtime gsearch config files, including index.properties.)

I will add that using gsearch with solr is a complication compared to just using gsearch with the lucene library (whch is also the core of solr). Do it if you need solr features, which you must know how to configure, gsearch does not help you with solr, except when it comes to indexing foxml records.

Let me hear, how it goes in this way.

Cheers,
Gert


On 02/12/2010, at 21.20, Christopher Curry wrote:

Gert,

New information:

I tried using the "updateIndex fromPid" and got the following error:

Connection error (is Solr running at http://localhost:8080/solr/update ?): java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:8080/solr/update

I entered "demo:5" in the "Pid" search field.

>From what context does gsearch try to access http://localhost:8080/solr/update?

Solr is running on localhost, but I'm working remotely and the browser from which I'm using the REST interface is not.

This is the only thing that shows up in the tomcat logs after running this command:

Dec 2, 2010 2:59:37 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/update params={} status=500 QTime=5

Are there any step-by-step instructions for configuring GSearch available?  The documentation is very spare.  I followed the existing instructions to the letter.  Can you see anything in my setup process that would cause this problem?

Everything I did step-by-step is laid out here:

http://pastebin.com/KkXGDg0Z

My edits to configvalues.xml may be where the problem arose.  The instructions in this file just direct one to "Set the property values for your environment."  I did that to the best of my ability, but perhaps I missed something?  After editing this file, which I saved outside the tomcat server, as directed, I ran "ant -f configvalues.xml configOnWebServer".  Besides copying configBasic/updater/  to config/updater, is there anything else that need to be done to configure GSearch to use Solr?

For your convenience, I've copied the configvalues.xml changes here:

<?xml version="1.0" encoding="UTF-8"?>
<!--  $Id: build.xml 6534 2008-01-30 16:22:28Z gertsp $ --><project name="FgsConfig" default="configOnWebServer" basedir=".">
...
        <property name="soap.deploy.hostport" value="banyan:8080" />
        <property name="soap.deploy.user" value="***************" />
        <property name="soap.deploy.pass" value="***************" />
        <target name="configDefault"
                  description="select the default config, by setting these three properties">
                <property name="default.config.path" location="${solr.config.path}" />
                <property name="default.config.prefix" value="${solr.config.prefix}" />
                <property name="default.index.1" value="${solr.index.1}" />
...
        </target>
...
        <target name="configDemoOnSolr"
                description="set values for configDemoOnSolr">
...
                <property name="solr.index.1.indexbase" value="http://banyan:8080/solr" />
                <property name="solr.index.1.indexdir" value="/home/admin/solr/data/index" />
...
                <property name="solr.repos.1.fedorasoap" value="http://banyan:8080" />
                <property name="solr.repos.1.fedorauser" value="*************" />
                <property name="solr.repos.1.fedorapass" value="*************" />
...
        </target>
 

</project>

Thanks for your time.

Cheers,

Christopher Curry
Assistant Technical Librarian / Assistant IT Officer

American Philosophical Society
105 South Fifth Street
Philadelphia, PA 19106-3386
Tel. (215) 599-4299

ccurry@amphilsoc.org

Main Library number: (215)440-3400
APS website: http://www.amphilsoc.org



On 12/02/2010 09:01 AM, Gert Schmeltz Pedersen wrote:
I notice

  
org.apache.solr.common.SolrException: ERROR:unknown field 'PID' 
    
Which indicates that your schema.xml file does not mention the PID field. In configDemoOnSolr/index/DemoOnSolr/conf/schema.xml the PID field is specified, please do the same in your schema.xml . That may solve some or all of the problems.

Regards, Gert
  




--
Cheers,
 
Christopher Curry
Assistant Technical Librarian / Assistant IT Officer

American Philosophical Society
- Library Hall
105 South Fifth Street
Philadelphia, PA 19106-3386
Tel. (215) 599-4299

ccurry@amphilsoc.org
 
Main Library number: (215) 440-3400
APS website: www.amphilsoc.org