Skip navigation
All Places > Alfresco Content Services (ECM) > Blog > Authors harry.peek@alfresco.com

Later in the year we will be launching a new enterprise analytics product for Alfresco built on top of Search Services and Solr.

 

One of the capabilities it will bring is the ability to write SQL queries against the Solr datastore and so I wanted to share where we are with that SQL support. Below we have documented how the SQL works and also listed what isn't yet supported at the end.

 

I'd love to know what you think about the level of support so do comment or message with any feedback or questions.

 

 

 

SELECT statements

 

The basic syntax of the SQL select is as follows:

Select DBID, cm_creator as creator, `cm_content.size`  as size from alfresco where `cm_content.size` > 1000 order by  `cm_content.size` desc limit 100

In the sections below we’ll explain and expand on the different aspects of this SQL statement.

 

Table

 

For the EA release the only table that can be specified is the alfresco table. The alfresco table contains the documents and fields that have been indexed within the Alfresco Indexing Server’s main alfresco index.

 


Fields

 

Standard Fields

 

Alfresco has a set of standard fields, which can be referred to by name in the SQL field list. The DBID field in the example SELECT statement is an example of a standard field.

 

The most useful ones are: PARENT, PATH, ANCESTOR, TYPE, ASPECT, PROPERTIES, NULLPROPERTIES, FIELDS, LID and  DBID.

 

 

Fields from Content Models

 

Fields from Alfresco’s out of-the-box content models as well as fields from custom content models can be referred to using the content model property qname, as in AFTS and the CMIS query language. The cm_creator field in the example SQL statement refers to the creator field in the out-of-the-box cm content model. Fields that have a unique local name over all prefixes do not need to use the prefix. Note that we use "_" to separate the prefix and the locale name as ":" would have to be escaped.

 

Escaping Fields

 

Fields that include reserved words or special characters will need to be escaped using the back tick character (`). The `cm_content.size` field in the example SQL statement is an example of back tick escaping. The only non-word character that can be used without escaping is the underscore “_”. 

 

Under the covers the implementation uses Apache Calcite which has a list of reserved words that would also need to be escaped. You are most likely to hit reserved keywords picking aliases for fields.

 

Field Aliases

 

SQL field aliases are supported in the field list. Field aliases cannot be used in the WHERE, ORDER BY or HAVING clauses. Field aliases that contain special characters or reserved words will need to be escaped with the back tick.

 

Predicate

 

Alfresco’s SQL predicate is designed to take advantage of the rich search capabilities available in the Alfresco Search Service.

 

Predicates on Text Fields

 

The basic predicate on a text field performs a phrase search. Below is the syntax of a basic predicate on a text field:

select DBID from alfresco where cm_content = ‘hello world’

This will search for the phrase ‘hello world’ in the cm_content field.

 

To gain full control of the search predicate for a specific field you can wrap the predicate in parenthesis and enter the query using Alfresco full text search syntax. For example to search for (hello OR world) in the cm_content field the following search predicate can be used:

select DBID from alfresco where cm_content = ‘(hello OR world)’

 

Predicates on String Identifier Fields

 

Predicates on string identifier fields will perform an exact match on the field.  For example:

select DBID, LID from alfresco where LID = ‘value’

The SQL statement above will perform an exact match on the LID field.

 

Most fields from the content models will perform full text search matches unless the property is defined as tokenised false in the model.
This may not be what you expect.

 

Predicates on Numeric Fields

 

The predicate on numeric fields can perform =, >=, <= and Alfresco Solr range queries.

 

Below are some examples using the =, >=, <=

select DBID, LID from alfresco where DBID = 123

select DBID, LID from alfresco where DBID >= 123

select DBID, LID from alfresco where DBID <= 123

select DBID, LID from alfresco where DBID >= 100 AND DBID <=123

 

Below are examples of Alfresco Solr range queries:

select DBID, LID from alfresco where DBID =’[* TO 123]’

This will select all DBIDs below 123, with inclusive ranges. The square brackets are inclusive ranges.

 

select DBID, LID from alfresco where DBID =’[* TO 123>’

This will select all DBIDs below 123, with an exclusive top range. < and > are exclusive ranges.

 

select DBID, LID from alfresco where DBID =’[123 TO *]’

This will select all DBIDs  above 123, with inclusive ranges.

 

select DBID, LID from alfresco where DBID =’<123 TO *]’

This will select all DBIDs above 123, with an exclusive bottom range.

 

select DBID, LID from alfresco where DBID =’<100 TO 123>’

This will select all DBIDs above 100 and below 123, with an exclusive top and bottom range.

 

Nested Boolean Predicates

 

SQL predicates can be combined with Boolean operators AND, OR and NOT and nested with parenthesis.

select DBID from alfresco where (cm_content = ‘hello world’ AND (DBID >= 100 AND DBID < 200))

 

Order By

 

SQL SELECT statements can contain an ORDER  BY clause with one or more order by fields. String identifiers and numeric fields can be specific in the ORDER BY clause.

 

Below is an example of  an ORDER BY on a numeric field:

select cm_creator, cm_name, exif_manufacturer, audio_trackNumber from alfresco order by audio_trackNumber asc

 

Limit

 

SQL SELECT statements can contain a LIMIT clause. If no limit is specified a default limit of 1000 is set. Caution should be used when increasing the default limit as performance and memory consumption increase as the limit increases.

 

SELECT DISTINCT statements

 

The basic syntax for SELECT DISTINCT syntax is as follows:

select distinct cm_name from alfresco where cm_content = 'world' order by cm_name asc

 

SELECT DISTINCT queries can also have multiple fields and multiple order by fields.

Aggregations Without GROUP BY

 

SQL aggregations without a GROUP BY clause return a single result tuple with the aggregation results. Below is an example:

 

select count(*) as count, avg(`cm_content.size`) as content_size from alfresco where cm_owner = 'xyz'

Aggregate functions

 

Alfresco SQL supports the following aggregation functions:

 

count(*)

sum(numeric_field)

avg(numeric_field)

min(numeric_field)

max(numeric_field)

 

Aggregate Fields

 

 

Any numeric field can be used within the aggregations sum, avg, min and max. As with the basic SELECT statements, aggregation fields defined by content models can be referenced using the content model prefix. Fields that are reserved words or contain special characters will need to be escaped with the back tick character.

 

Aggregate Result Tuple

 

 

If a field alias is specified for an aggregate function then the field alias will appear in the result tuple. If field aliases are not used then the field name for the aggregate functions will appear as follows: EXPR$1, EXPR$2. These values refer to the function expression by the order they appear in the field list, starting from 1. For example the first function that appears in the query will be named EXPR$1 in the result tuples.

 

Aggregations With GROUP BY

 

SQL aggregations with a GROUP BY clause are also supported and take the following form:

 

select `cm_content.mimetype`, count(*) as total_count from alfresco group by `cm_content.mimetype` having count(*) < 4 order by count(*) asc

 

Aggregate functions

 

Alfresco SQL supports the following aggregation functions: count(*), sum(numeric_field), avg(numeric_field), min(numeric_field), max(numeric_field).

 

Aggregation Fields

 

Any numeric field can be used within the aggregations sum, avg, min and max. As with the basic SELECT statements fields defined by content models can be referenced using the content model prefix. Fields that are reserved words or contain special characters will need to be escaped with the back tick character.

 

Group By Fields

 

One or more fields can be specified as group by fields. Fields that are designated as facetable in a content model will provide the best aggregation results.

Aggregate Result Tuples

 

 

If a field alias is specified for an aggregate function then the field alias will appear in the result tuple. If field aliases are not used then the field name for the aggregate functions will appear as follows: EXPR$1, EXPR$2. These values refer to the function expression by the order they appear in the query, starting from 1. For example the first function that appears in the query will be named EXPR$1 in the result tuples.

Order by

 

One or more fields may used in the ORDER BY clause. The ORDER BY clause can include both fields from the field list and aggregate functions. Field aliases cannot be used in the ORDER BY clause. When referring to an aggregate function in the ORDER BY clause the function call as it appears in the field list should be used.

Having

 

 

The HAVING clause is supported for aggregation functions only. Boolean logic and nested HAVING clauses are supported. The following comparison operations are supported in the HAVING clause: =, >=, <=, !=.

 

Limit

A LIMIT clause can be used to limit the number of aggregations results. If no LIMIT clause is provided a default limit of 1000 is applied. 

Time Series Aggregations

 

There is specific support for SQL time series reporting through the use of virtual time dimensions. The section below describes how virtual time dimensions are used.

 

Virtual Time Dimensions

 

Virtual time dimensions for every datetime field are automatically created and stored in the Alfresco Search Service. The three virtual time dimensions supported for the EA release are: _day, _month, _year. To use the virtual time dimensions you simply append the virtual time dimension to any datetime field and use it in the GROUP BY clause.  Below is an example where the _day dimension is appended to the cm_created datetime field.

 

select cm_created_day, count(*) as total from alfresco where cm_created >= 'NOW/DAY' group by cm_created_day

The query above creates a daily time series report using the cm_created_day virtual time dimension.

 

Datetime Predicates

 

A datetime predicate can be used in the WHERE clause to control the datetime range of the time series report. Notice in the example query the where clause:

 

where cm_created >= 'NOW/DAY'

 

This is a datetime predicate on the cm_created field. Its important to note that the virtual time dimension field is only used in the field list and GROUP BY clause. The predicate is applied to the non-virtual datetime field in the index.

 

The example above is using a date math expression to specify a lower boundary for the time series report. The sections below describe how to set lower and upper boundaries using both fixed date and date math predicates.

 

Unbounded Time Series Reports

 

If no datetime predicate is supplied, the following default lower and upper boundaries for the different time dimensions will be used:

 

day

lower: current day minus 1 month

upper: current full day

 

month

lower: current month minus 24 months

upper: current full month

 

year

lower: current year minus 5 years

upper: current full year

 

Fixed Datetime Predicates

 

Fixed datetime predicates are formatted according to a subset of ISO 8601. The SQL statement below shows an example of the fixed date predicate formatting:

 

select cm_created_day, count(*) from alfresco where cm_created >= '2010-02-01T01:01:01Z' and cm_created <= '2010-02-14T23:59:59Z' group by cm_created_day

 

Note that fixed datetime predicates require the full precision shown in the example above. 

 

Date Math Predicates

 

There is also support for a rich set of date math expressions. Below is an example of a time series aggregation using date math predicates:

 

select cm_created_month, count(*) from alfresco where cm_created >= 'NOW/MONTH-6MONTHS' and cm_created <= 'NOW' group by cm_created_month

 

In the example above NOW signifies the current point in time with milli-second precision. NOW/MONTH rounds the current point in time down to the current MONTH. The -6MONTHS subtracts 6 months from the current month. 

 

See the Solr date math guide for more details on date math syntax.

 

Single Dimension Group By

 

Time series aggregations that group by virtual time dimensions are currently limited to using a single group by field. 

 

Order By

 

By default time series aggregation results are sorted in datetime ascending order. An ORDER BY clause can be used to change the direction of the datatime sort or sort by an aggregate result. 

 

Having

A HAVING clause can be used to filter time series aggregations results.

 

JDBC Driver
 

The product includes a JDBC thin client that can be used with Apache Zeppelin and other SQL clients. The JDBC driver can also be used directly from a Java application. Below is sample code for using the JDBC driver:

 

String sql = "select DBID, LID from alfresco where cm_content = 'world' order by DBID limit 10 ";
String alfrescoJson = "{\"tenants\":[\"\"],\"locales\":[\"en_US\"],\"defaultNamespace\":\"http://www.alfresco.org/model/content/1.0\",\"textAttributes\":[],\"defaultFTSOperator\":\"OR\",\"defaultFTSFieldOperator\":\"OR\",\"anyDenyDenies\":true,\"query\":\"name:*\",\"templates\":[],\"allAttributes\":[],\"queryConsistency\":\"DEFAULT\",\"authorities\":[\"GROUP_EVERYONE\",\"ROLE_ADMINISTRATOR\",\"ROLE_AUTHENTICATED\",\"admin\"]}";

Properties props = new Properties();
props.put("alfresco.shards", "http://localhost:8983/solr/alfresco")
props.put("json", alfrescoJson);

String connectionString = "jdbc:alfresco://localhost:8983?collection=alfresco";
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
   
try {
        con = DriverManager.getConnection(connectionString, props);
        stmt = con.createStatement();
        rs = stmt.executeQuery(sql);
        int i=0;
        while (rs.next()) {
            System.out.println(rs.getString("DBID"));
        }
    } finally {
        try { rs.close(); } catch(Exception e) {}
        try { stmt.close();} catch(Exception e) {}
        try { con.close();} catch(Exception e) {}
    }
}

Currently Unsupported SQL Constructs

Below are some commonly used SQL features that are not yet supported, some of these we are working at closing at the moment but we'd love to know which you would find most valuable. Leave a comment below or send me a message to give us your feedback. 

 

  • SELECT * : currently specific fields must be listed in the field list
  • SELECT COUNT(DISTINCT field): Currently count(distinct field) queries are not supported
  • HAVING limitations: currently the HAVING clause can only be applied to aggregation functions
  • JOINS : currently this no support for joins
  • SUB-QUERIES: currently there is no support for sub-queries
  • UNION: currently there is no support for union queries
  • IS NULL
  • IS NOT NULL
  • LIKE
  • CMIS QL functions IN_TREE, IN_FOLDER, SCORE, CONTAINS
  • IN

Search Services 1.1.0 is now available, here's a summary of what's changed. As ever, please let me know if you have any questions or you would like to give us any feedback.

 

 

New Search REST API Features

We have added support for new features in the search API. These come from feedback we received from the first release of the Search REST API with 5.2 and have added new capabilities to support more advanced reporting requirements. 

 

NB You will need either Community 201707 or the upcoming 5.2.1 release to take advantage of these.

 

 

 

New Sharding Option - DBID Range

We have added a new sharding method for Enterprise customers with a clustering license: DBID range sharding.

 

This will be the only option to offer any kind of auto-scaling as opposed to defining your shard count exactly at the start. The other sharding methods require repartitioning in some way.

 

For each shard you specify the range of DBIDs to be included. As your repository grows you can add shards. Look out for an upcoming blog post from search architect, Andy Hind explaining more about the differences between the different sharding methods. 

 

 

Bug Fixes

Complete list here

With Alfresco 5.2 we are introducing Alfresco Search Services and Solr 6.3, read more about Solr 6.3 and the new search features here.

 

In this post we'll look in more depth at using SSL with Solr 6. If you haven't already, see this post for more info on installing Solr 6 without SSL.

 

Introduction to SSL

HTTPS provides over-the-wire encryption and a means to secure access to Alfresco Search Services. Only those clients and applications that have an appropriate certificate can get access. See https://en.wikipedia.org/wiki/HTTPS for more details. It may use SSL or its successor TLS (SSL is sometimes used as a synonym for HTTPS).

 

You may choose to secure Alfresco Search Services in other ways. This post will guide you through setting up Alfresco One 5.2 with "SSL" enabled. Access to the Alfresco APIs by which Solr builds its index will be secured (URLs like repo/api/solr/*), access to the Solr 4 web application will be secure (URLS like solr4/*), and access to the Solr 6 application (URLS like localhost:8983/solr/*) will be secured.

 

In addition, Solr 6 supports sharded indexes with "SSL" (which was not possible with Solr 4). Once secured you'll need to install a certificate on your browser to gain access to the protected URLs. You should generate your own unique certificates. In this task we focus on what to do after you have generated your own keys, using the example well-known certificate that comes with the installer. Using the "default" certificate will provide encryption but not authentication.

 

The steps below describe how to install Alfresco Search Services over HTTPS protocol.

 

Install and prepare your Alfresco One 5.2 installation

You can use your existing Alfresco One 5.2 installation or start a new one from scratch (see this post for more info on installing Solr 6). In this paragraph we'll see how to prepare your Alfresco installation.

 

 

Install Alfresco Search Services

Now that Alfresco One 5.2 is correctly installed and prepared, we're going to install Alfresco Search Services 1.0.

 

  • Download Alfresco Solr 6 distribution from here, unpack it, and move it to your preferred location.
  • Prepare the keystore by creating the folder <solr6>/solrHome/keystore.
  • Into this new folder copy the ssl.repo.client.keystore and ssl.repo.client.truststore files from <alfresco-one-5-2>\solr4\templates\rerank\conf.
  • Update the SSL properties in <solr6>/solr.in.sh (if you're in a Linux based platform) as described below.
    SOLR_SSL_KEY_STORE=<solr>/keystore/ssl.repo.client.keystore
    SOLR_SSL_KEY_STORE_PASSWORD=kT9X6oe68t
    SOLR_SSL_TRUST_STORE=<solr>/keystore/ssl.repo.client.truststore
    SOLR_SSL_TRUST_STORE_PASSWORD=kT9X6oe68t
    SOLR_SSL_NEED_CLIENT_AUTH=true
    SOLR_SSL_WANT_CLIENT_AUTH=false
    If you are using a Windows based platform the file will be called <solr6>\solr.in.cmd and the content should be updated as described below.
    set SOLR_SSL_KEY_STORE=<solr>\keystore\ssl.repo.client.keystore
    set SOLR_SSL_KEY_STORE_PASSWORD=kT9X6oe68t     
    set SOLR_SSL_TRUST_STORE=<solr>\keystore\ssl.repo.client.truststore     
    set SOLR_SSL_TRUST_STORE_PASSWORD=kT9X6oe68t     
    set SOLR_SSL_NEED_CLIENT_AUTH=true    
    set SOLR_SSL_WANT_CLIENT_AUTH=false
  • Update <solr6>/solrHome/conf/shared.properties as described below.
    // Enabling the suggestion as with Solr 4 (Suggestion is disabled by default for SOLR 6).
    alfresco.suggestable.property.0={http://www.alfresco.org/model/content/1.0}name
    alfresco.suggestable.property.1={http://www.alfresco.org/model/content/1.0}title
    alfresco.suggestable.property.2={http://www.alfresco.org/model/content/1.0}description
    alfresco.suggestable.property.3={http://www.alfresco.org/model/content/1.0}content

    // Enabling camelCaseSearch support in all fields as Solr 4.
    alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
    alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
    alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext

    If you are installing Solr on the same host then the default solr.host, solr.port, solr.baseulr will be correct.

 

Starting Alfresco Search Services

In this paragrah we are going to see how to setup and start the installed Alfresco Search Services 1.0.

 

  • Start Solr in foreground using the following options.
    solr/bin/solr start -f -a "-Djavax.net.ssl.keyStoreType=JCEKS -Djavax.net.ssl.trustStoreType=JCEKS -Dsolr.ssl.checkPeerName=false"
  • Enable dynamic sharding using the Alfresco administration page, available at the link below.

See the screenshot below for how the administration page looks like.

 

 

  • Click Manage to create an unsharded Archive index.
  • Enter the details for your Solr 6 server (https://<solr_ip>:8983/solr) in the New Index Server box and click Add.
  • Fill in the details as shown in the following screenshot. Click Create Shard Group when you're done.

 

 

  • Once the submission as been completed, the index will appear in the shard view as they start to track.
  • Click Manage to create a sharded Alfresco index.
  • Enter the details for your Solr 6 server (https://<solr_ip>:8983/solr) in the New Index Server box and click Add. If you created the archive index above the index server may already be listed.
  • Please fill in the form in the way the screenshot shows. Fill in the details as shown in the following screenshot. Click Create Shard Group when you're done.

     

     

    • Once the submission as been completed, the index will appear in the shard view as they start to track.
    • Check in the Solr administration console that both the indexes are correctly listed. See the following screenshot for how the console should look.

     

     

    Validate Search over HTTPS

    Now that the Alfresco Search Services is up and running with the correct settings, let's see how to validate the searches over HTTPS.

     

     

    • You can validate searches executing one (or more) searches over Alfresco using Alfresco Share.

     

     

     

    Please let us know how you get on, leave a comment or email harry.peek@alfresco.com

    Read more about the changes and new features introduced with Solr 6 here.

     

    In this post we will share more information about setting up an Alfresco Enterprise/Solr sharded search index. If you haven't already, see this post for more info on installing Solr 6.

     

    When an index grows too large to be stored on a single search server it can be distributed across multiple search servers. This is known as sharding. The distributed/sharded index can then be searched using Alfresco/Solr's distributed search capabilities. Alfresco/Solr has several different methods to choose from for routing documents and ACL's to shards.

     

    In this post we will focus on the out-of-the-box approach which is sharding by Node ID. In Alfresco/Solr's configuration this is referred to as DBID sharding, as the DBID field is used to hold the Node ID in the Solr index. With DBID sharding, documents are routed to shards based on a hash of the Node ID of the document. Hashing on the Node ID is a simple approach that relies on randomness to evenly distribute documents across the shards.

     

    When using the DBID sharding approach, all ACLs are indexed on each shard. This ensures that the ACL for each node is co-located on the same shard. This is required for proper access control enforcement. The DBID sharding method is ideal for use cases where there are a large number of nodes, but a smaller number of ACLs.

     

    Follow the steps described below to complete the sharding setup and test.

     

    Switch the Search Services to Solr 6

    1. Go to the Alfresco Admin Console.
    2. Go to the Search Service Console.
    3. Select Solr 6 as the search service.
    4. Save the Search Service settings.

     

    Turn on Dynamic Sharding

    1. Go to the Index Service Sharding page as described in the screeshot below.

     

     

    1. Check the Dynamic Shard Instance Registration checkbox.
    2. Save the Index Service Sharding settings.

     

    Install Solr 6

    1. Solr 6 is not installed with the Alfresco Installer, so you'll need the Alfresco/Solr 6 zip file - download it here.
    2. Create a directory for each shard in the distributed index. This can be on the same server or different servers.
    3. Unzip the Solr 6 zip file in each directory.

     

    Edit the shared.properties

    1. Inside each of the Solr 6 directories there is a directory called solrhome.
    2. Edit the solrhome/conf/shared.properties file.
    3. Change the solr.port property to be the port you want to start Solr on.
    4. Change the solr.host property to the host that Solr is running on.

     

    Start each Solr instance

    For each Solr install:

    1. At the same level as the solrhome directory there will be a solr directory.

    2. Enter the solr directory and enter the following command:

      ./bin/solr start

      This will start solr on the default port (8983).

      To start Solr on a different port enter the command:

      ./bin/solr start -p PORT_NUMBER

      Replace PORT_NUMBER with the port you will be starting Solr on.

    3. Open a browser and go to the solr admin screen:
      http://hostname:port/solr

      http://hostnameport

    You will see a Solr 6 admin screen without any cores created

     

    Add Index Servers

    1. Go to the Index Server Sharding Page on the Alfresco Admin Console.
    2. Choose Manage.
    3. A window will display where you can add new index servers.
    4. Add the base URL for each Solr server using the form, for example: http://hostname:port/solr.
    5. Stay on the Manage screen for the next step.

     

    Add a Shard Group

    1. In the Manage screen add a Shard Group.
    2. Specify the number of shards, shard instances (replicas of shards), and the core name.
    3. Select Create Shards.

     

    This will create Solr cores for each shard and shard replica on the index servers that have been registered. The cluster is now created and will began tracking the Alfresco repository and indexing documents and ACLs across the sharded index.

     

     

    Please let us know how you get on, leave a comment or email harry.peek@alfresco.com

    With Alfresco 5.2 we are introducing Alfresco Search Services and Solr 6.3, read more about Solr 6.3 and the new features here.

     

    With Solr 6 there is a significant change - it's now a standalone application powered by a jetty server. In this post we will cover the additional steps required to configure and setup Alfresco and Solr 6.

     

     

     

     

     

    Enterprise with clustering license

    NB if using SSL please also refer to this post

    1. Download Alfresco Solr 6 distribution from here, unpack and move to a preferred location.

    2. Start Solr 6 using the command below.

      $SOLR_HOME/solr/bin/solr start
    3. Open a browser (assuming you're in the same server where Solr 6 is installed) and navigate to:

      http://localhost:8983/solr/
    4. You should see Solr's admin screen - in here you can see the Solr version in use is 6.x.

    5. Edit the alfresco-global.properties file as shown below to disable SSL, then restart Alfresco.

      solr.secureComms=none
    6. Login as admin and navigate to the Admin Console. Use the following link (assuming you have Alfresco installed into localhost at port 8080).
      http://localhost:8080/alfresco/s/enterprise/admin/admin-systemsummary
    7. Upload and apply the appropriate license.

    8. Restart Alfresco, and once it's restarted return to the Admin Console.

    9. Select "Search Service" from the navigation.

    10. Select Solr 6 from the "Search Service In Use" dropdown and review the details.

    11. Click on Save to set Solr 6 as the default Search Engine.

    12. To create the new cores, select "Index Server Sharding" from the navigation.

    13. Select the "Dynamic Shard Instance Registration" check box and click 'Save'. 

    14. Click on Manage, which will launch the Index Server Shard Management popup.

    15. Enter the Solr 6 ip address, port and context (for example http://127.0.0.1:8983/solr) and click Add.

      You can also configure and setup Solr shards at this stage, this will be covered fully in another blog

    16. Scroll down to Manage Default Indexes and click on Create Alfresco to create Alfresco Core.

    17. Click on Create Archive to create the Archive Core.

    18. Scroll down to the Report section to see a response.

      Congratulation! You've now configured Alfresco to work with Solr 6.

    19. Now it's time to verify that it has created Alfresco and an Archive core. Open a browser (assuming you're in the same server where Solr 6 is installed) and navigate to:

      http://localhost:8983/solr/
    20. In the Solr Admin UI select the core selector dropdown and verify that both Alfresco and Archive are present in the dropdown.

    21. Allow a few minutes for the content to be searchable on Solr 6.

     

    Community

    1. Download Alfresco community from http://alf-community-nightly.s3-website-eu-west-1.amazonaws.com/ .
      When installing make sure you do not launch alfresco, by ticking the box (add image)
    2. Configure Alfresco to use Solr 6 as the default search subsystem
      by editing the alfresco-global.properties file (ALFRESCO_HOME/tomcat/shared/classes/alfresco-global.properties)
      ### Solr indexing ###
      index.subsystem.name=solr6
      solr.host=localhost
      solr.port=8983
      solr.port.ssl=8984
      solr.secureComms=none
    3. Download Alfresco Solr 6 distribution, unpack and copy the Solr 6 folder to $ALFRESCO_HOME.
    4. Solr 6 does not come with Alfresco workspace and archive stores by default so you'll need to create them. To do so start Solr and create the cores with the following command:
      ALFRESCO_HOME/solr6/solr/bin/solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
    5. Open a browser and navigate to http://localhost:8983/solr/to verify that Solr has started. You should see Solr's admin page
    6. Select the core selector dropdown and verify that both Alfresco and Archive are present in the dropdown.
      This signifies that both cores have been created.
    7. Start Alfresco and allow a couple of minutes to index the content.

    For your interest, we would like to submit to your attention another tutorial fromAxel Faust about using Solr6 in Alfresco Community Edition 5.2 (201612 GA).

    Filter Blog

    By date: By tag: