Customize and Group Search Results

Use the Item Definition tab to customize the item URL and item grouping for search results.

  1. In The Framework Admin Console select the Content tab.
  2. On the Content Management page select for your SQL Content Source Content Sources do the following: Receive data from the Source System via the Connection, Filter the data it receives, Provide the results to the Target, Define the specific search index that contains the content you wish to index (and later search)..
  3. Click the Item Definition tab.


  4. Item Query:
    1. Enter a SQL statement that returns metadata Provides context with details such as the source, type, owner, and relationships to other data sets. Metadata provides details around the item being crawled by Connectivity Hub. about an item based on the unique identifiers returned in the enumerator.
    2. You can enter more than one SQL statement here, separated by a semi-colon, as long as the first statement returns only one row.
    3. The data in subsequent statements can be accessed directly through the scripting interface on any of the metadata fields.
    4. After entering your SQL, you can click the Test and Load Metadata link above the entry box to validate your query and pre-load the Select column quick-pick boxes
      1. Definitions
        1. @SPW_ID
          1. A required parameter to your SQL statement.
          2. Or use @S_SPW_ID (for string) or @I_SPW_ID (for integer)
        2. @SPW_SUBID
          1. An optional parameter if your item requires more than one ID for uniqueness.
        3. SPW_LASTUPDATE or SPW_LASTUPDATEUTC
          1. Only required if you are supporting incremental indexing and a suitable last update field is available.
          2. Use the UTC version if the data is stored as UTC in your database.
        4. SPW_DELFLAG
          1. An optional column if your system supports 'soft' deletes where there is an indicator of deletion.
          2. The supported values are 1, -1, t, true, y, and yes.
          3. Place the character @S_ or @I_ in front of a variable to indicate String or Integer value. For example, @S_SPWID
          4. Sample
            SELECT TITLE,ABSTRACT,INDUSTRY, TAXONOMYTERM,SEARCHTERMS,LASTUPDATED
            AS SPW_LASTUPDATE
            FROM CrawledDocument with (NOLOCK)
            WHERE Id = @S_SPW_ID
            SELECT TITLE,ABSTRACT,INDUSTRY,TAXONOMYTERM,SEARCHTERMS,
            LOCATION,ISPUBLIC, LASTUPDATED AS SPW_LASTUPDATE
            FROM CrawledDocument
            WHERE Id = @S_SPW_ID

            Note: For this exercise you can skip the remaining steps and Click Save.
  5. Unstructured Data Options:
    1. Use this option if this item contains unstructured data (PDF, word file etc).
    2. The file can reside in the database as a binary object or on a file share.
      1. None (Meta Data only): Option to not define any unstructured data.
      2. Text (Database Columns): Use to pick columns from your data to combine to form custom data. Use scripting for further customization.
      3. File (Network Share): Use the Standard Format Field to return the path to the file.
      4. File (Database Blob): Enter the column that contains the data of the blob.
      5. File (Create Zip): Use the scripting interface to dynamically create a zip file with multiple entries. Use HOST.AddFileToZip(filepath, newfilename) to add entries. For more information, see VB.Net Scripting.

        Sample:
        Copy
        HOST.AddFileToZip("E:\samplefiles\downloads\"& HOST.GetStringValue("DocumentFileName"),HOST.GetStringValue("DocumentFileName"))
  6. Item Url:
    1. Use to define the link that gets returned in search results.
      Note: Verify there is a crawl rule allowing this host, or it will not be indexed.
    2. Click Crawl Rules to manage the crawl rules.
  7. Item Title:
    1. Define the title that appears in search results.
  8. Item Author:
    1. Define the author of the item that appears in search results.
    2. See Standard Format Field.
  9. Click Save.