Lucene Search

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
sanjaybandhniya
Senior Member

Lucene Search

I have create one job which is creating folder structure with inheritance permission false.

Now if i am searching with lucene query from other user who do not have permission on folder,  lucene return result with all node even if do not have permission.

I am using Java to search node where loggein user has permission.

Description File: 

<webscript>
<shortname>Metadata</shortname>
<description>Metadata</description>
<url>/metadata</url>
<authentication>user</authentication>
<format default="json"></format>
</webscript>

Java : 

StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
String query = "PATH:\"//app:company_home/app:dictionary/cm:" + Constants.FOLDER_COUNTRY+ "/cm:"+ Constants.FOLDER_CITY + "/*\" AND TYPE:\"cm:folder\"";
ResultSet rs = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, query);

2 Replies
afaust
Master

Re: Lucene Search

  1. Do NOT use the search language Lucene. It is a legacy language only included in Alfresco for support of low-level operations. Stick to FTS or CMIS only.
  2. What Alfresco version are you using?
  3. Are you sure your SOLR is setup correctly?
  4. Can the same user access the folder(s) they should not have access to via the Share user interface, or does the problem only exist in your web script?
  5. How did you obtain the reference to the SearchService - which bean name did you use? Note that if you use the wrong name, you may be using an API without permission checking enabled.
sanjaybandhniya
Senior Member

Re: Lucene Search

It's Resolved.Issue with SearchService.