cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Lucene Search

tbuktu
Champ in-the-making
Champ in-the-making
Hi,

I installed 1.0.0 RC2 (WAR download) into a local Tomcat on my Win32-laptop and have run into problems with Search not finding anything.

alfresco.log contains the following:


10:56:50,353 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network) - v1.0.0 (rc2); repository vunknown (pre 1.0.0 RC2)
10:58:00,094 ERROR [org.alfresco.repo.search.impl.lucene.LuceneBase] Error
java.io.FileNotFoundException: C:\java\apache-tomcat-5.5.12\bin\alf_data\lucene-indexes\workspace\SpacesStore\index\segments (Das System kann die angegebene Datei nicht finden)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
   at org.apache.lucene.store.FSInputStream$Descriptor.<init>(FSDirectory.java:376)
   at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java:405)
   at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:268)
   at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:40)
   at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:116)
   at org.apache.lucene.store.Lock$With.run(Lock.java:109)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
   at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
   at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:296)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.updateFullTextSearch(LuceneIndexerImpl.java:1575)
   at org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl.index(FullTextSearchIndexerImpl.java:166)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
   at $Proxy4.index(Unknown Source)
   at org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob.execute(FTSIndexerJob.java:36)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
10:58:00,194 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.ftsIndexerJobDetail threw an unhandled Exception:
org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed FTS update
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.updateFullTextSearch(LuceneIndexerImpl.java:1737)
   at org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl.index(FullTextSearchIndexerImpl.java:166)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
   at $Proxy4.index(Unknown Source)
   at org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob.execute(FTSIndexerJob.java:36)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed to open IndexSarcher for ./alf_data/lucene-indexes\workspace\SpacesStore\\index\
   at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:312)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.updateFullTextSearch(LuceneIndexerImpl.java:1575)
   … 15 more
Caused by: java.io.FileNotFoundException: C:\java\apache-tomcat-5.5.12\bin\alf_data\lucene-indexes\workspace\SpacesStore\index\segments (Das System kann die angegebene Datei nicht finden)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
   at org.apache.lucene.store.FSInputStream$Descriptor.<init>(FSDirectory.java:376)
   at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java:405)
   at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:268)
   at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:40)
   at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:116)
   at org.apache.lucene.store.Lock$With.run(Lock.java:109)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
   at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
   at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:296)
   … 16 more
10:58:00,204 ERROR [org.quartz.core.ErrorLogger] Job (DEFAULT.ftsIndexerJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed FTS update]
   at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
* Nested Exception (Underlying Cause) —————
org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed FTS update
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.updateFullTextSearch(LuceneIndexerImpl.java:1737)
   at org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl.index(FullTextSearchIndexerImpl.java:166)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
   at $Proxy4.index(Unknown Source)
   at org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob.execute(FTSIndexerJob.java:36)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: org.alfresco.repo.search.impl.lucene.LuceneIndexException: Failed to open IndexSarcher for ./alf_data/lucene-indexes\workspace\SpacesStore\\index\
   at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:312)
   at org.alfresco.repo.search.impl.lucene.LuceneIndexerImpl.updateFullTextSearch(LuceneIndexerImpl.java:1575)
   … 15 more
Caused by: java.io.FileNotFoundException: C:\java\apache-tomcat-5.5.12\bin\alf_data\lucene-indexes\workspace\SpacesStore\index\segments (Das System kann die angegebene Datei nicht finden)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
   at org.apache.lucene.store.FSInputStream$Descriptor.<init>(FSDirectory.java:376)
   at org.apache.lucene.store.FSInputStream.<init>(FSDirectory.java:405)
   at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:268)
   at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:40)
   at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:116)
   at org.apache.lucene.store.Lock$With.run(Lock.java:109)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
   at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
   at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
   at org.alfresco.repo.search.impl.lucene.LuceneBase.getSearcher(LuceneBase.java:296)
   … 16 more

It looks like the lucene indexes have not been created properly.  Am I missing something?  I don't remember to have the same problem with Alfresco version prior to the release candidates.

Best regards,
Thorsten
8 REPLIES 8

fouellet
Champ in-the-making
Champ in-the-making
I seem to have the same problem with the Enterprise Network RC1 version on Tomcat/Linux.
Smiley Sad

andy
Champ on-the-rise
Champ on-the-rise
Hi

FTS indexing is started in two ways:

1) at the end of a transaction an FTS index request may be made for stuff that is not indexed atomically;
2) at start up to make sure outstanding index tasks are completed.

I think you have a config issue. At start up, all the stores are found and each one gets an FTS request. If the index does not exist (usually because the config is wrong) this will give the error you describe. If the store exists the index should have been made and should exist.

Look in the repository.properties file and check the dir.root property
This is now ./alf_data it has been ./alfresco in the past.
The relative path does mean the content and index are placed in different places if you run using both tomcat and jboss for example, and also if you change tomcat versions and have a different install location.

Check that the directory exists
C:\java\apache-tomcat-5.5.12\bin\alf_data
and that
lucene-indexes\workspace\SpacesStore\index
exists and contains stuff.
You should also be able to find the files that contain content.

I hope this helps.
Let me know how you get on.

Regards

Andy

tbuktu
Champ in-the-making
Champ in-the-making
Thanks Andy,

I'm afraid it was my fault.  I didn't recreate the database schema although I did a clean install of alfresco.

Cheers,
Thorsten

derek
Star Contributor
Star Contributor
This will be glossed up a little: http://www.alfresco.org/jira/browse/AR-206

henry
Champ in-the-making
Champ in-the-making
Hi,

I installed alfresco-jboss-1.0.0. After creating some spaces, users, I create some contents as well as add some contents like Doc and Pdf files. When I searching with "all items", there are some problems like:

1)Browse Spaces area: always shows " No items to display. Click the 'Create Space' action to create a space." Even if I use advanced search, choose "Specify Space", it doesn't work.
2)Content items area: show but not right, sometime show a lot  *ftl files which are in \Alfresco's subdirectories.

I check 
C:\alfresco\alf_data\lucene-indexes\workspace\SpacesStore\index
there are some stuffs there.

server log file as :
"2005-11-02 10:47:17,765 INFO  [org.apache.slide.util.logger] Setting TLock timeout for store tx to 120 seconds
2005-11-02 10:47:17,765 INFO  [org.apache.slide.util.logger] Setting object cache size for store tx to 10000
2005-11-02 10:47:42,875 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: imconvert "C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_source_40527.gif"  "C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp\Alfresco\ImageMagickContentTransformer_init_target_40528.png"
2005-11-02 10:47:57,937 ERROR [org.alfresco.smb.protocol] Error accessing Win32 NetBIOS, check DLL is on the path
2005-11-02 10:48:07,859 INFO  [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4_0_2 date=200505022023)] Started in 1m:9s:500ms
"

I don't find those problems in previous tomcat version.

henry

derek
Star Contributor
Star Contributor
Hi,

Are you running against the database populated by the previous install, or have you started with a completely new install?

Can you read the Alfresco tutorial document?   :wink: I don't mean that in a rude way - does the server have access to the correct content store?

Regards

henry
Champ in-the-making
Champ in-the-making
thanks derek

I re-do everything. It works.  I created three text files in different spaces that including word "red dog". But i can only search out one. The HTML content can't be searched out.

regards


henry

derek
Star Contributor
Star Contributor
Hi,

Kevin has just sent this checkin, which came up from some retests.  Apparently, the quotes were being handled incorrectly.  The nightly build will be back up again tonight, and it should be fixed in there. (org site downloads).

If you do the search without quotes, it will probably return results, although there may be too many.  Hopefully this is a fix for the issue.

Changes
. Fixed bug in Search phrase search (e.g. multiple words within a quoted string "one two three" was broken)


Files

Modified: W:/HEAD/projects/web-client/source/java/org/alfresco/web/bean/SearchContext.java
Committed revision 1753.

Regards