cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco + SOLR Search

deepak1987
Star Contributor
Star Contributor
I have configured SOLR as a subsytem in Alfresco 4.0 version.

In alfresco-global.properties, following properties has been set.

### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
### Solr indexing ###

Now, While searching using searchService API, we have to specify Search Language as an argument.

What should I specify in order to use SOLR Search ??

1) searchService.query(Repository.getStoreRef(), SearchService.LANGUAGE_SOLR_ALFRESCO, "PATH:\"/app:company_home\"");

2) searchService.query(Repository.getStoreRef(), SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home\"");

What is the significant of above two ?

Thanks,
Deepak
2 REPLIES 2

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

With SOLR the two are the same.
With lucene, the first uses the lucene sub-system, the second would send to a SOLR server even thought a lucene subsystem is configured.

You should use SearchService.LANGUAGE_LUCENE which follows the sub-system.

Andy

deepak1987
Star Contributor
Star Contributor
Thanks a lot Andy.   Smiley Happy

Is there any example or material showing use of SOLR API with Alfresco in Action.
In http://docs.alfresco.com/4.0/index.jsp site, nothing is there related to API usage.

Thanks,
Deepak