[fcrepo-user] problems with GSearch + Solr

6 views
Skip to first unread message

Swithun Crowe

unread,
Mar 9, 2011, 5:37:18 AM3/9/11
to fedora-com...@lists.sourceforge.net
Hello

I'm trying to get Fedora GSearch and Solr to work together, as steps to
installing Islandora. I have Fedora 3.4, GSearch 2.2 and Solr 1.3. I was
getting the dreaded "no segments* file" errors, but I have managed to get
these to go away. Now I have this error:

dk.defxws.fedoragsearch.server.errors.GenericSearchException: IndexReader open error indexName=DemoOnSolr :
; nested exception is:
org.apache.lucene.index.CorruptIndexException: Unknown format version: -9
at dk.defxws.fgssolr.OperationsImpl.getIndexReader(OperationsImpl.java:629)
at dk.defxws.fgssolr.OperationsImpl.updateIndex(OperationsImpl.java:252)
at dk.defxws.fedoragsearch.server.GenericOperationsImpl.updateIndex(GenericOperationsImpl.java:308)
at dk.defxws.fedoragsearch.server.RESTImpl.updateIndex(RESTImpl.java:261)
at dk.defxws.fedoragsearch.server.RESTImpl.doGet(RESTImpl.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -9
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:225)
at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:94)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:653)
at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:111)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:206)
at dk.defxws.fgssolr.OperationsImpl.getIndexReader(OperationsImpl.java:627)

I can search using Solr and it will find things that it has indexed. But
when I try to search using GSearch, I get the above error.

I've looked at the Lucene jars used by GSearch and Solr. They are both
version 2.4. According to the Solr FAQ, this is usually an indication of
conflicting versions used for the creation and reading of the index. But
the versions I'm using seem to be the same.

I know some other people have had this problem, but have any of them found
a solution?

Thanks.

Swithun.

--
The University of St Andrews is a charity registered in Scotland: SC013532

Gottwig, Jeremy M. (GSFC-272.0)[ZIMMERMAN & ASSOC.]

unread,
Mar 9, 2011, 8:33:10 AM3/9/11
to Support and info exchange list for Fedora users.
You probably already checked this, but just in case: are your filesystem permissions in order?

I've experienced a number of read errors that were due to permissions and file ownership.
________________________________________
From: Swithun Crowe [c...@st-andrews.ac.uk]
Sent: Wednesday, March 09, 2011 5:37 AM
To: fedora-com...@lists.sourceforge.net
Subject: [fcrepo-user] problems with GSearch + Solr
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Fedora-commons-users mailing list
Fedora-com...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Swithun Crowe

unread,
Mar 9, 2011, 12:23:01 PM3/9/11
to Support and info exchange list for Fedora users.
Hello

GJM> You probably already checked this, but just in case: are your
GJM> filesystem permissions in order? I've experienced a number of read
GJM> errors that were due to permissions and file ownership.

I think they are OK. If one tomcat web app can read/write to the indexes,
then I would imagine another one could too. My directories are all 755,
and files are 644, owned by the user running tomcat.

I have a virtual image running Islandora now, so I'll see how they have it
working. I notice that their files and directories are set 664 and 775.
They also have newer versions of the lucene jars (2.9.1), so I might
experiment with these.

Swithun Crowe

unread,
Mar 10, 2011, 10:16:05 AM3/10/11
to Support and info exchange list for Fedora users.
Hello

SC> I have a virtual image running Islandora now, so I'll see how they
SC> have it working. I notice that their files and directories are set 664
SC> and 775. They also have newer versions of the lucene jars (2.9.1), so
SC> I might experiment with these.

I have GSearch and Solr working now. I replaced the old lucene 2.4 .jar
files in the fedoragsearch and solr web apps with the 2.9.1 versions,
deleted the old index directory, and it all works.

Martinez Garcia, Agustina

unread,
Mar 21, 2011, 12:07:39 PM3/21/11
to Support and info exchange list for Fedora users.
Hi Swithun,

I've replaced gsearch lucene jar files with the one provided in Solr (2.9.3, in my case) and Gsearch seems to work fine.
Hope it helps!

Cheers,
Agustina


________________________________________
From: Swithun Crowe [c...@st-andrews.ac.uk]

Sent: 09 March 2011 10:37


To: fedora-com...@lists.sourceforge.net
Subject: [fcrepo-user] problems with GSearch + Solr

Hello

Thanks.

Swithun.

------------------------------------------------------------------------------

Swithun Crowe

unread,
Mar 21, 2011, 12:55:54 PM3/21/11
to Support and info exchange list for Fedora users.
Hello

MGA> I've replaced gsearch lucene jar files with the one provided in Solr
MGA> (2.9.3, in my case) and Gsearch seems to work fine. Hope it helps!

Thanks for following this up. I too found that getting newer Lucene jars
(and using the same ones in all web apps) did the trick. In my excitement
I forgot to post my solution.

find tomcat/webapps/{fedora,luceneweb,fedoragsearch}/WEB-INF/lib -name "*.jar"| grep lucene

tomcat/webapps/fedora/WEB-INF/lib/lucene-core-2.9.1.jar
tomcat/webapps/luceneweb/WEB-INF/lib/lucene-demos-2.9.1.jar
tomcat/webapps/luceneweb/WEB-INF/lib/lucene-core-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-core-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-misc-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-demos-2.4.0.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-analyzers-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-spellchecker-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-queries-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-highlighter-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-memory-2.9.1.jar
tomcat/webapps/fedoragsearch/WEB-INF/lib/lucene-snowball-2.9.1.jar
Reply all
Reply to author
Forward
0 new messages