Step 1. Launch Aspire and open the Content Source Management page

Launch Aspire (if it's not already running). See:


Step 2. Add a new Elasticsearch content source

To specify exactly what shared folder to crawl, we will need to create a new "Content Source".

To create a new content source:

  1. From the Content Source , click on "Add Source" button.
  2. Click on "Elasticsearch Connector".



Step 2a. Specify basic information


In the "General" tab in the Content Source Configuration window, specify basic information for the content source:

  1. Enter a content source name in the "Name" field. 
    1. This is any useful name which you decide is a good name for the source. It will be displayed in the content source page, in error messages, etc.
  2. Click on the Scheduled pulldown list and select one of the following: Manually, PeriodicallyDaily, Weekly or Advanced.
    1. Aspire can automatically schedule content sources to be crawled on a set schedule, such as once a day, several times a week, or periodically (every N minutes or hours).For the purposes of this tutorial, you may want to select Manually and then set up a regular crawling schedule later.
  3. Click on the Action pulldown list to select one of the following: Start, StopPause, or Resume.
    1. This is the action that will be performed for that specific schedule.
  4. Click on the Crawl pulldown list and select one of the following: Incremental, FullReal Time, or Cache Groups.
    1. This will be the type of crawl to execute for that specific schedule.

After selecting a Scheduled, specify the details, if applicable:

  • Manually: No additional options.
  • Periodically: Specify the "Run every:" options by entering the number of "hours" and "minutes."
  • Daily: Specify the "Start time:" by clicking on the hours and minutes drop-down lists and selecting options.
  • Weekly: Specify the "Start time:" by clicking on the hours and minutes drop-down lists and selecting options, then clicking on the day checkboxes to specify days of the week to run the crawl.
  • Advanced: Enter a custom CRON Expression (e.g. 0 0 0 ? * *)

 

You can add more schedules by clicking in the Add New option, and rearrange the order of the schedules.
If you want to disable the content source just unselect the the "Enable" checkbox. This is useful if the folder will be under maintenance and no crawls are wanted during that period of time.
Real Time and Cache Groups crawl will be available depending of the connector.

Step 2b. Specify the connector information

You basically just have to fill this section

In the "Connector" tab, specify the connection information to crawl the Elastic.

  1. Hostname: The elasticsearch server hostname.
  2. Port: The elasticsearch server port number.
  3. Protocol: The elasticsearch server url protocol.
  4. Index: The elasticsearch index to crawl, it supports multiple indexes and the use of the wildcard "*".
  5. Ensure Unique Id:  Check to ensure unique documents ids when crawling multiple indexes, if not checked id collision could happen.
    This will be done by appending the index name with a delimiter to the id.
    This option will be ignored if only a single index without wildcard (*) is specified.
    1. Id Delimiter: The delimiter that will be used to append the index name to the document id.
  6. Use Basic Authentication: Select this to enable basic user authentication.
    1. Username: The name of elasticsearch user to use.
    2. Password: The password of elasticsearch user to use.
  7. Store source as connector specific fields: Check to keep the elasticsearch connector metadata and to store all the fields of the elasticsearch source as connector specific fields.
    If not checked, the elasticsearch source will be used as the document metadata in the same format that it was retrieved.
  8. Crawl Mode: Select the crawl mode, a snapshot based crawl with deletes support or a timestamp based crawl with better performance but without support for deleted documents .
    1. Use snapshots: Select this for a snapshot based crawl.
      1. Discovery Signature Fields: Enter the name of the fields to be used to generate the documents signature.
      2. Discovery Query: The query to run for discovering documents. This query is used for full and incremental crawls.
        The slice and size sections are required and must contain the placeholders {{sliceNumber}}, {{slizeTotal}}, {{pageSize}}".
        Use track_total_hits : true for ES version 7 or above.
    2. Use timestamp: Select this for a timestamp based crawl.
      1. Timestamp field: The field that containts the timestamp of the document.
      2. Discovery Query: The query to run for discovering documents. This query is used for full crawls.
        The slice and size sections are required and must contain the placeholders {{sliceNumber}}, {{slizeTotal}}, {{pageSize}}".
        Use track_total_hits : true for ES version 7 or above.
      3. Discovery Query Incremental: The query to run for discovering documents for incremental crawls.
        The slice and size sections are required and must contain the placeholders {{sliceNumber}}, {{slizeTotal}}, {{pageSize}}, {{timestamp}}.
        Use track_total_hits : true for ES version 7 or above.
  9. Fetch Options: Options to manage the way the content is retrieved from Elasticsearch.
    1. Should Fetch Documents:Check to fetch the documents content.
    2. Use MGET for fetchings: Check to user MGET for fetching the documents. If not individual GET requests will be executed for each document.
    3. Wait for discovery before fetching: Check to make the fetch process wait for discovery process to be done.
    4. Include Fields: The specified fields will be included in the fetch process of the document.
      1. Include Field: Enter the name of the field to include in the fetch process.
    5. Exclude Fields: The specified fields will be excluded in the fetch process of the document.
      1. Exclude Field: Enter the name of the field to exclude in the fetch process.
  10. Connection: Options to manage the connection to Elasticsearch
    1. Number of slices: The number of slices to use for the queries.
    2. Page size: The number of documents to get per request.
    3. Scroll timeout: The time to keep each scroll request active.
    4. Connection timeout: The timeout to use for the connections to elastic.
    5. Number of Slice Retries: The number of retries for each slice processing.
    6. Slice Retry Wait Time: The time in millis to wait between each slice retry.
    7. Number of Request Retries:The number of retries for each Elasticsearch request.
    8. Requests Retry Wait Time: The time in millis to wait between each Elasticsearch request retry.
    9. Use Connection Throttling:Check to enable connection throttling.
      1. Throttle Rate in Millis:The throttle rate in milliseconds.
      2. Connections Rate: The number of connection to allow in the the specified throttle rate.
  11. Check crawled documents count: Check to execute an initial document count query that will be used at the end of the crawl to validate the total of crawled documents.




Step 2c. Specify workflow information

In the "Workflow" tab, specify the workflow steps for the jobs that come out of the crawl. Drag and drop rules to determine which steps should an item follow after being crawled. This rules could be where to publish the document or transformations needed on the data before sending it to a search engine. See Workflow for more information.

  1. For the purpose of this tutorial, drag and drop the Publish To File rule found under the Publishers tab to the onPublish Workflow tree.
    1. Specify a Name and Description for the Publisher.
    2. Click Add.

After completing this steps click on the Save then Done and you'll be sent back to the Home Page.


Step 3: Initiate a full crawl


Now that the content source is set up, the crawl can be initiated.

  1. Click on the crawl type option to set it as "Full" (is set as "Incremental" by default and the first time it'll work like a full crawl. After the first crawl, set it to "Incremental" to crawl for any changes done in the repository).
  2. Click on the Start button.

During the Crawl

During the crawl, you can do the following:
  • Click on the "Refresh" button on the Content Sources page to view the latest status of the crawl.

    The status will show RUNNING while the crawl is going, and CRAWLED when it is finished.

  • Click on "Complete" to view the number of documents crawled so far, the number of documents submitted, and the number of documents with errors.

If there are errors, you will get a clickable "Error" flag that will take you to a detailed error message page.


Step 4: Initiate an Incremental Crawl


If you only want to process content updates from the Elasticsearch (documents which are added, modified, or removed), then click on the "Incremental" button instead of the "Full" button. The Elasticsearch connector will automatically identify only changes which have occurred since the last crawl.

If this is the first time that the connector has crawled, the action of the "Incremental" button depends on the exact method of change discovery. It may perform the same action as a "Full" crawl crawling everything, or it may not crawl anything. Thereafter, the Incremental button will only crawl updates.

Statistics are reset for every crawl.

Group Expansion Remove if the connector doesn't use 


Group expansion configuration is done on the "Advanced Connector Properties" of the Connector tab.

  1. Click on the Advanced Configuration checkbox to enable the advanced properties section.
  2. Scroll down to Group Expansion and click the checkbox.
  3. Add a new source for each repository you want to expands groups from (you'll need administrator rights on all of them to be able to do this).
  4. Set the default domain, user name and password of the crawl account.
  5. Set an schedule for group expansion refresh and cleanup.
  6. As an optional setting click on the "Use external Group Expansion" checkbox to select an LDAP Cache component for LDAP group expansion. See more info on the LDAP Cache component on LDAP Cache