Showing posts with label solr. Show all posts
Showing posts with label solr. Show all posts

Friday, March 31, 2017

Alfresco 5.x Solr Tuning Tips

PaidVerts
Searching on alfresco system should be efficient and utilize solr in effective way. By default there are many factors we are not able to pin point or not taken into consideration
For Solr optimizations let follow below practices:

Tuning Criteria

  1.  If you are not using search functionality on deleted content , then better you should disable archive core.  (Edit inside solr.xml  and commenting archive core)
  2.  If you only require searching on content or only metadata then disable full text searching for that make property like  alfresco.index.transformContent=false
  3. On intranet if that is secure enough do not use SSL that may be overhead.
  4. Use local storage instead shared folders, use faster hardware RAID/SSD.
  5. Tune mergeFactor to 25 better for indexing and  2 for search.
  6. Tune ramBufferSize in solrconfig.xml, it is by default 32MB we need to tune it.
  7. Configure transformation timeout.
  8. Increase index batch count to get more result on your indexing webscript 
  9. Disable unnecessary services from OS
  10. Enable jodConvertor instead  LibreOffice
  11. Regularly cleanup trashcan data.

Saturday, March 11, 2017

Running Solr NonSSL way - Alfresco 5.x

Many times we are keeping default configuration with Alfresco -> SOLR communication.
Sometime we require that they want to communicate without SSL (https) communication to reduce network overhead and security impact performance.

So to turn off Alfresco repository and solr server communication via SSL, we are following below steps useful to us.



For Alfresco Repository configuration

  1. Set solr.secureComms=none  in alfresco-global.properties file
  2. Make sure solr.port you set is non-ssl in application config where solr is running.
  3. For the below path
<solrRootDir>/archive-SpacesStore/conf/solrcore.properties
<solrRootDir>/workspace-SpacesStore/conf/solrcore.properties

  • set  alfresco.secureComms=none
  • verify alfresco.port is set to nonSSL port.

Inside repository web.xml remove below block
<security-constraint>
   <web-resource-collection>
       <web-resource-name>SOLR</web-resource-name>
       <url-pattern>/service/api/solr/*</url-pattern>
   </web-resource-collection>

   <auth-constraint>
       <role-name>repoclient</role-name>
   </auth-constraint>

   <user-data-constraint>
       <transport-guarantee>CONFIDENTIAL</transport-guarantee>
   </user-data-constraint>
</security-constraint>

<security-constraint>
   <web-resource-collection>
       <web-resource-name>SOLR</web-resource-name>
       <url-pattern>/s/api/solr/*</url-pattern>
   </web-resource-collection>

   <auth-constraint>
       <role-name>repoclient</role-name>
   </auth-constraint>

   <user-data-constraint>
       <transport-guarantee>CONFIDENTIAL</transport-guarantee>
   </user-data-constraint>
</security-constraint>

<security-constraint>
    <web-resource-collection>
       <web-resource-name>SOLR</web-resource-name>
       <url-pattern>/wcservice/api/solr/*</url-pattern>
    </web-resource-collection>

    <auth-constraint>
       <role-name>repoclient</role-name>
    </auth-constraint>

    <user-data-constraint>
       <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

<security-constraint>
    <web-resource-collection>
       <web-resource-name>SOLR</web-resource-name>
       <url-pattern>/wcs/api/solr/*</url-pattern>
    </web-resource-collection>

    <auth-constraint>
       <role-name>repoclient</role-name>
    </auth-constraint>

    <user-data-constraint>
       <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

<login-config>
    <auth-method>CLIENT-CERT</auth-method>
    <realm-name>Repository</realm-name>
</login-config>

<security-role>
    <role-name>repoclient</role-name>
</security-role>
In solr   web.xml  remove below block

<security-constraint>
   <web-resource-collection>
      <url-pattern>/*</url-pattern>
   </web-resource-collection>
   <auth-constraint>
      <role-name>repository</role-name>
   </auth-constraint>
      <user-data-constraint>
         <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </user-data-constraint>
</security-constraint>
<login-config>
   <auth-method>CLIENT-CERT</auth-method>
      <realm-name>Solr</realm-name>
</login-config>
<security-role>
   <role-name>repository</role-name>
</security-role>
restart application server to take effect.

Wednesday, April 23, 2014

Reindexing solr on Alfresco 4.x

In certain condition we are not getting our nodes are in sync or while searching node are not appear in search. This is due to non-indexed nodes.

Re-index required to index those nodes.
Here are few steps you can consider to re-index solr.

Note: Here I assume you have single machine on which alfresco and solr running on same server.

#1 : First confirm solr core directories

you can find archive-SpacesStore and workspace-SpacesStore core directories.
you can determine location using solrcore.properties.


This properties file mostly in following location:
<alf_home>\alf_data\solr\workspace-SpacesStore\conf

#2 : Stop alfresco server

#3 : Delete the contents in following directories
        - <alf_home>\alf_data\solr\workspace\SpacesStore
   - <alf_home>\alf_data\solr\archive\SpacesStore

#4 : Delete the models in following directories
     - <alf_home>\alf_data\solr\workspace-SpacesStore\alfrescoModels
  - <alf_home>\alf_data\solr\archive-SpacesStore\alfrescoModels


#5 : Restart Alfresco/solr
   - Start alfresco server which is having solr server





Friday, August 17, 2012

Renew Solr license in alfresco 4.x

Solr license is going to expire within this week (At the time this blog is written).

To renew it follow below steps :

1) Download file generate_keystores.bat  Download File
2) Rename file  from <generate_keystores.bat.sample> to  <generate_keystores.bat>
3) Open <generate_keystores.bat> in text editor
4) Provide proper <ALFRESCO_HOME> path
5) Run bat file


This will give you message on console like "Certificate update complete"
Also you need to make entry in alfresco-global.properties like below

dir.keystore=%ALFRESCO_KEYSTORE_HOME%

where ALFRESCO_KEYSTORE_HOME  =  ALFRESCO_HOME/alf_data/keystore