jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Schriftman" <schri...@gmail.com>
Subject Re: Excerpts Question
Date Wed, 11 Jun 2008 05:10:11 GMT
Marcel -

I'm on 1.4.4 and I'm using
org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager.
I've a lot of data in my repository, and it scares me to think that I can't
rebuild my indexes. What can I do to fix the inconsistency?

Thanks again for your help,

Marc Schriftman

On Fri, Jun 6, 2008 at 9:18 AM, Marcel Reutegger <marcel.reutegger@gmx.net>
wrote:

> Hi Marc,
>
> looks like your workspace contains an inconsistency. What jackrabbit
> version and what kind of persistence manager are you using?
>
> e.g. the bundle DB persistence managers in jackrabbit come with
> consistencCheck and consistencyFix parameters that you can enable in the
> workspace.xml. once enabled, the workspace will check consistency and try to
> fix inconsistencies.
>
>
> regards
>  marcel
>
>
> Marc Schriftman wrote:
>
>> Marcel - thanks very much for the quick response. You were exactly right -
>> I
>> had neglected to update workspace.xml. Unfortunately, after adding the
>> correct parameters to it, I can't reindex the workspace. When I rename
>> workspaces/default/index and restart Jackrabbit, I get this error:
>>
>> java.io.IOException: Error indexing workspace
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:385)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:425)
>>    at
>>
>> org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
>>    at
>>
>> org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
>>    at
>> org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
>>    at
>>
>> org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
>>    at
>>
>> org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
>>    at
>>
>> org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
>>    at
>> org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
>>    at
>> org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
>>    at
>>
>> com.bsgalliance.storage.jackrabbit.j2ee.StorageServiceServlet.createRepository(StorageServiceServlet.java:532)
>>    at
>>
>> com.bsgalliance.storage.jackrabbit.j2ee.StorageServiceServlet.initRepository(StorageServiceServlet.java:513)
>>    at
>>
>> com.bsgalliance.storage.jackrabbit.j2ee.StorageServiceServlet.startup(StorageServiceServlet.java:390)
>>    at
>>
>> com.bsgalliance.storage.jackrabbit.j2ee.StorageServiceServlet.onInit(StorageServiceServlet.java:90)
>>    at
>>
>> com.bsgalliance.j2ee.BaseAuthenticatedServlet.init(BaseAuthenticatedServlet.java:255)
>>    at javax.servlet.GenericServlet.init(GenericServlet.java:168)
>>    at
>>
>> com.meterware.servletunit.WebApplication$ServletConfiguration.getServlet(WebApplication.java:586)
>>    at
>>
>> com.meterware.servletunit.WebApplication$WebResourceMap.autoLoadServlets(WebApplication.java:993)
>>    at
>> com.meterware.servletunit.WebApplication.<init>(WebApplication.java:137)
>>    at
>> com.meterware.servletunit.WebApplication.<init>(WebApplication.java:116)
>>    at
>> com.meterware.servletunit.ServletRunner.<init>(ServletRunner.java:119)
>>    at
>> com.meterware.servletunit.ServletRunner.<init>(ServletRunner.java:112)
>>    at
>>
>> com.bsgalliance.storage.jackrabbit.j2ee.StorageServiceServletTest.<clinit>(StorageServiceServletTest.java:41)
>>    at java.lang.Class.forName0(Native Method)
>>    at java.lang.Class.forName(Class.java:164)
>>    at
>>
>> com.intellij.rt.execution.junit.TestRunnerUtil.loadTestClass(TestRunnerUtil.java:136)
>>    at
>>
>> com.intellij.rt.execution.junit.TestRunnerUtil.createClassOrMethodSuite(TestRunnerUtil.java:88)
>>    at
>>
>> com.intellij.rt.execution.junit.TestRunnerUtil.getTestSuite(TestRunnerUtil.java:62)
>>    at
>>
>> com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:23)
>>    at
>>
>> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
>>    at
>> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
>> Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException:
>> d7a366dc-8bf1-40d2-865a-d9a1e25011a1
>>    at
>>
>> org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:260)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1024)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1025)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1025)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1025)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1025)
>>    at
>>
>> org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:380)
>>    ... 30 more
>>
>> Any suggestions?
>>
>> Thanks in advance!
>>
>> On Wed, Jun 4, 2008 at 3:34 AM, Marcel Reutegger <
>> marcel.reutegger@gmx.net>
>> wrote:
>>
>>  Hi Marc,
>>>
>>> please check the following points:
>>>
>>> - configuration changes to repository.xml only affect newly created
>>> workspaces, make sure you changed any existing workspace.xml files
>>>
>>> - changes to parameters 'suppportHightlighting' and 'textFilterClasses'
>>> require that you re-index the workspace, otherwise only newly added
>>> resources are indexed according to the new value.
>>>
>>> regards
>>>  marcel
>>>
>>>
>>> Marc Schriftman wrote:
>>>
>>>  Hey y'all
>>>>
>>>> A quick excerpt question, if you don't mind. I've configured my
>>>> repository
>>>> for excerpts:
>>>>
>>>> <param name="supportHighlighting" value="true"/>
>>>> <param name="excerptProviderClass"
>>>> value="org.apache.jackrabbit.core.query.lucene.DefaultHTMLExcerpt"/>
>>>> <param name="textFilterClasses" value="
>>>>           org.apache.jackrabbit.extractor.HTMLTextExtractor,
>>>>           org.apache.jackrabbit.extractor.MsExcelTextExtractor,
>>>>           org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,
>>>>           org.apache.jackrabbit.extractor.MsWordTextExtractor,
>>>>           org.apache.jackrabbit.extractor.PdfTextExtractor,
>>>>           org.apache.jackrabbit.extractor.PlainTextExtractor
>>>> "/>
>>>>
>>>> and my code looks like this:
>>>>
>>>> Query query = queryManager.createQuery("//element(*,
>>>> nt:resource)[jcr:contains(., '" + partial +
>>>> "')]/(@jcr:uuid|rep:excerpt(.))", Query.XPATH);
>>>> RowIterator iter = query.execute().getRows();
>>>> while (iter.hasNext()) {
>>>> final Row row = iter.nextRow();
>>>> final String uuid = row.getValue("jcr:uuid").getString();
>>>> final String excerpt = row.getValue("rep:excerpt(.)").getString();
>>>> getWriter().println(excerpt);
>>>>
>>>> and this is what I'm getting:
>>>>
>>>> <excerpt><fragment>238b244d-8ed2-4e6b-b319-1c26256eb580 ...
>>>> 63f7bdc2-0667-4366-bed8-5c0928fba5d2 ...
>>>> application/vnd.ms-powerpoint</fragment></excerpt>
>>>> <excerpt><fragment>0affc599-1dfc-4813-8c57-93a8d6349226 ...
>>>> f00a9ba8-7e69-4337-be02-49fcffc6fb72 ...
>>>> application/pdf</fragment></excerpt>
>>>>
>>>>
>>>> Anyone know what I'm doing wrong? It feels like it might be
>>>> configuration
>>>> related, since that's not even the correct format for the
>>>> DefaultHTMLExcerpt, but what's with the guid weirdness?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Marc Schriftman
>>>>
>>>>
>>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message