You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Pedro Saraiva <ps...@maisis.pt> on 2011/02/10 15:35:07 UTC

Disable lucene in jackrabbit

Hello,

It's possible to disable the lucene indexing/searching in jackrabbit?

Kind regards,

Pedro Saraiva

Re: Disable lucene in jackrabbit

Posted by Alexander Klimetschek <ak...@adobe.com>.
On 14.02.11 20:37, "John Tranier" <tr...@gmail.com> wrote:

>Hi,
>
>I had the same experience : comment out the searchIndex section leads to
>errors in the log.
>I asked about it on the list, and I've been told the kernel uses the
>searchIndex to support its internal queries.
>So I'm a bit confused about the last update of documentation.

>>with SearchIndex commented out I've found you get the following logged
>> as "ERROR" when logging in:
>> 
>> ERROR [main] [14 Feb 2011 15:40:58,693
>> 
>>org.apache.jackrabbit.core.security.user.AuthorizableImpl:getMembershipRe
>>ferences@371]:
>> Failed to retrieve membership references of User 'admin'.
>> javax.jcr.RepositoryException: Unable to retrieve WEAKREFERENCE
>> properties that refer to 21232f29-7a57-35a7-8389-4a0e4a801fc3
>>     at 
>>org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3461)

Yes, AFAIK this is the only place where the repository itself uses the
search index. This was the "simplest" solution to implement the
WEAKREFERENCEs in JCR 2.0 - in Jackrabbit 1.x you could disable the search
index w/o problems.

I think the idea is to get rid of this search index dependency, but I
don't know if there is a solution yet. And this weakreference itself is
"only" coming in through the default security implementation, however I
think in most cases it's quite useful ;-)

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel





Re: Disable lucene in jackrabbit

Posted by John Tranier <tr...@gmail.com>.
Hi,

I had the same experience : comment out the searchIndex section leads to errors in the log.
I asked about it on the list, and I've been told the kernel uses the searchIndex to support its internal queries.
So I'm a bit confused about the last update of documentation.

We've faced a severe issue on our application using Jackrabbit as repository : users was complaining about random lost of documents.
We did several actions, including reactivation of the searchIndex, and the problem disappeared. 
I cannot tell for sure if the searchIndex was the the cause of the problem, but I'm not very likely to disable it now. 

Regards,
John


Le 14 févr. 2011 à 05:49, Kevin Jansz a écrit :

> with SearchIndex commented out I've found you get the following logged
> as "ERROR" when logging in:
> 
> ERROR [main] [14 Feb 2011 15:40:58,693
> org.apache.jackrabbit.core.security.user.AuthorizableImpl:getMembershipReferences@371]:
> Failed to retrieve membership references of User 'admin'.
> javax.jcr.RepositoryException: Unable to retrieve WEAKREFERENCE
> properties that refer to 21232f29-7a57-35a7-8389-4a0e4a801fc3
> 	at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3461)
> 	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.getMembershipReferences(AuthorizableImpl.java:369)
> 	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.collectMembership(AuthorizableImpl.java:312)
> 	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.memberOf(AuthorizableImpl.java:100)
> 	at org.apache.jackrabbit.core.security.user.UserImpl.memberOf(UserImpl.java:36)
> 	at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.collectGroupMembership(DefaultPrincipalProvider.java:290)
> 	at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.getGroupMembership(DefaultPrincipalProvider.java:194)
> 	at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:676)
> 	at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.commit(AbstractLoginModule.java:369)
> 	at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
> 	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1497)
>        ...
> Caused by: javax.jcr.RepositoryException: no search manager configured
> for this workspace
> 	at org.apache.jackrabbit.core.WorkspaceImpl.getQueryManager(WorkspaceImpl.java:778)
> 	at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3445)
> 	... 33 more
> 
> 
> This is in jackrabbit 2.1.0, possibly to do with the "Default"
> security config in place:
>    <Security appName="Jackrabbit">
>        <SecurityManager
> class="org.apache.jackrabbit.core.DefaultSecurityManager"
> workspaceName="security"/>
>        <AccessManager
> class="org.apache.jackrabbit.core.security.DefaultAccessManager"/>
>        <LoginModule
> class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
>           <param name="anonymousId" value="anonymous"/>
>           <param name="adminId" value="admin"/>
>        </LoginModule>
>    </Security>
> 
> ... because there's no alternative QueryManager when no (lucene)
> SearchIndexes are configured? It doesn't seem to stop the repository
> from responding
> 
> --
> Kevin Jansz
> kevin.jansz@exari.com
> Level 7, 10-16 Queen Street, Melbourne 3000 Australia
> Tel +61 3 9621 2773 | Fax +61 3 9621 2776
> Exari Systems
> Boston | London | Melbourne | Munich
> www.exari.com
> 
> Test drive our software online - www.exari.com/demo-trial.html
> Read our blog on document assembly - blog.exari.com
> 
> 
> 
> 
> On 11 February 2011 01:43, Thomas Mueller <mu...@adobe.com> wrote:
>> Hi,
>> 
>> I have updated the documentation at:
>> http://wiki.apache.org/jackrabbit/Search#Search_Configuration
>> 
>> 
>> "To disable the search index, disable (comment out) the index
>> configuration in the file repository.xml and workspace.xml file(s)."
>> 
>> Regards,
>> Thomas
>> 
>> 
>> On 2/10/11 3:35 PM, "Pedro Saraiva" <ps...@maisis.pt> wrote:
>> 
>>> Hello,
>>> 
>>> It's possible to disable the lucene indexing/searching in jackrabbit?
>>> 
>>> Kind regards,
>>> 
>>> Pedro Saraiva
>> 
>> 


Re: Disable lucene in jackrabbit

Posted by Kevin Jansz <ke...@exari.com>.
with SearchIndex commented out I've found you get the following logged
as "ERROR" when logging in:

ERROR [main] [14 Feb 2011 15:40:58,693
org.apache.jackrabbit.core.security.user.AuthorizableImpl:getMembershipReferences@371]:
Failed to retrieve membership references of User 'admin'.
javax.jcr.RepositoryException: Unable to retrieve WEAKREFERENCE
properties that refer to 21232f29-7a57-35a7-8389-4a0e4a801fc3
	at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3461)
	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.getMembershipReferences(AuthorizableImpl.java:369)
	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.collectMembership(AuthorizableImpl.java:312)
	at org.apache.jackrabbit.core.security.user.AuthorizableImpl.memberOf(AuthorizableImpl.java:100)
	at org.apache.jackrabbit.core.security.user.UserImpl.memberOf(UserImpl.java:36)
	at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.collectGroupMembership(DefaultPrincipalProvider.java:290)
	at org.apache.jackrabbit.core.security.principal.DefaultPrincipalProvider.getGroupMembership(DefaultPrincipalProvider.java:194)
	at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:676)
	at org.apache.jackrabbit.core.security.authentication.AbstractLoginModule.commit(AbstractLoginModule.java:369)
	at org.apache.jackrabbit.core.security.authentication.LocalAuthContext.login(LocalAuthContext.java:86)
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1497)
        ...
Caused by: javax.jcr.RepositoryException: no search manager configured
for this workspace
	at org.apache.jackrabbit.core.WorkspaceImpl.getQueryManager(WorkspaceImpl.java:778)
	at org.apache.jackrabbit.core.NodeImpl.getWeakReferences(NodeImpl.java:3445)
	... 33 more


This is in jackrabbit 2.1.0, possibly to do with the "Default"
security config in place:
    <Security appName="Jackrabbit">
        <SecurityManager
class="org.apache.jackrabbit.core.DefaultSecurityManager"
workspaceName="security"/>
        <AccessManager
class="org.apache.jackrabbit.core.security.DefaultAccessManager"/>
        <LoginModule
class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
           <param name="adminId" value="admin"/>
        </LoginModule>
    </Security>

... because there's no alternative QueryManager when no (lucene)
SearchIndexes are configured? It doesn't seem to stop the repository
from responding

--
Kevin Jansz
kevin.jansz@exari.com
Level 7, 10-16 Queen Street, Melbourne 3000 Australia
Tel +61 3 9621 2773 | Fax +61 3 9621 2776
Exari Systems
Boston | London | Melbourne | Munich
www.exari.com

Test drive our software online - www.exari.com/demo-trial.html
Read our blog on document assembly - blog.exari.com




On 11 February 2011 01:43, Thomas Mueller <mu...@adobe.com> wrote:
> Hi,
>
> I have updated the documentation at:
> http://wiki.apache.org/jackrabbit/Search#Search_Configuration
>
>
> "To disable the search index, disable (comment out) the index
> configuration in the file repository.xml and workspace.xml file(s)."
>
> Regards,
> Thomas
>
>
> On 2/10/11 3:35 PM, "Pedro Saraiva" <ps...@maisis.pt> wrote:
>
>>Hello,
>>
>>It's possible to disable the lucene indexing/searching in jackrabbit?
>>
>>Kind regards,
>>
>>Pedro Saraiva
>
>

Re: Disable lucene in jackrabbit

Posted by Thomas Mueller <mu...@adobe.com>.
Hi,

I have updated the documentation at:
http://wiki.apache.org/jackrabbit/Search#Search_Configuration


"To disable the search index, disable (comment out) the index
configuration in the file repository.xml and workspace.xml file(s)."

Regards,
Thomas


On 2/10/11 3:35 PM, "Pedro Saraiva" <ps...@maisis.pt> wrote:

>Hello,
>
>It's possible to disable the lucene indexing/searching in jackrabbit?
>
>Kind regards,
>
>Pedro Saraiva