SearchIndexAddUpdate

The following code is an example of a JSON payload that is triggered when an item is added to or updated within the search index

"documentdata": {
    // the type of search item, e.g. BlogPost, Forum
    "type": "Document",
    // unique item identifier comprising type and reference id
    "uid": "Document_1055",
    // reference id of the item (may not be unique across types, see uid for unique id)
    "referenceid": "1055",
    // the id of the top level section (content area) that this item lives in
    "contentareaid": 1992,
    // the id(s) of the section that this item lives in
    "sectionid": [
        1996
    ],
    // the section id tree to the content, i.e. the "sectionid" and all parent section ids up to (and including) the content area id
    "discoverablesectionid": [
        1996,
        1993,
        1992
    ],
    // the title of the document
    "title": "Announcement!",
    // the variation of the title that will be used for alphabetised sorting
    "titleforsorting": "announcement ",
    // the item's short summary
    "summary": "Announcement summary",
    // the body of the document 
    "body": "Lorem Ipsum Hitchhiker simply generating synthesized improbability drive. Arthur\r\nDent closes world sector satisfaction secretively reasoning ship launch\r\nphysicists accident like science. Successful rulers effects of Babel\r\nFish hallucinations happen transformation Damogran mothers close particularly.\r\nsuperintelligent hookers powered motion Infinite Improbability Drive trying\r\ncup of tea would curve truth. Synthesized forty-two vector doors break into\r\nBetelgeuse exactly building thus simply side effects of paranoid android Marvin.\r\n",
    // any text indicating the 
    "location": "News & Events",
    // the user ID of whoever authored the item
    "authorid": 1,
    // the name of whoever authored the item
    "author": "Interact Admin",
    // the asset id for the item - can be used to display a thumbnail /api/asset/{avatar}
    "avatar": "1999",
    // the datetime at which it is meaningful to show this search item in search results (e.g. page publication start date)
    "startdate": "2019-08-16T13:01:00Z",
    // the datetime at which it is no longer meaningful to show this search item in search results (e.g. page publication end date) 
    "enddate": "2020-08-16T13:01:00Z",
    // the datetime at which this the item represented in this search item was last updated
    "updatedate": "2019-08-16T13:04:38.123Z",
    // a 'space' separated list of keywords associated with the document (for types that allow keywords such as pages or forumd) 
    "keywords": "hitchiker galaxy dent",
    // an array of tags associated with the item
    "hashtag": [
        "android",
        "sad"
    ],
    // the number of likes this item has
    "likecount": 3,
    // the number of comments this item has
    "commentcount": 2,
    // whether this item is considered a designated key page (if a page type)
    "iskey": false,
    // whether @mentioning has been explicitly disabled for this search item
    "disablementioning": false,
    // an array of attachment titles 
    "attachmenttitle": [
        "galaxy.jpg"
    ],
    // json serialised attachment metadata
    "attachmentsdata": "[{\"Id\":1030,\"Title\":\"galaxy.jpg\",\"Url\":\"/Utilities/Uploads/Handler/Uploader.ashx?area=composer&filename=galaxy.jpg&fileguid=28c49a21-a2cc-487f-89b1-27cf147e74fd\",\"Extension\":\".jpg\",\"FileSizeBytes\":3042221,\"Main\":false,\"TypeName\":\"UploadedFile\",\"DisableDownloads\":false}]",
    // internal css class indicator
    "icon": "icon-file",
    // a relative url indicating the intranet location of the item
    "url": "/Interact/Pages/Content/Document.aspx?id=1055",
    // an indication of whether the link should open in a new window (internal use)
    "target": null,
    // whether the item is in a publicly accessible section (this does not mean every user will be able to view this item)
    "ispublic": false,
    // an array of organisation ids which are permitted to view the item (if ispublic is true, this field will not be present)
    "allowedorganisations": [
        203,
        264
    ],
    // an array of user ids which are permitted to view the item (if ispublic is true, this field will not be present)
    "allowedpeople": [
        281
    ],
    // an array of user ids which are excluded from viewing the item (if ispublic is false, this field may not be present)
    "disallowedorganisations": [
        123,
        644
    ],
    // an array of user ids which are permitted to view the item (if ispublic is false, this field may not be present)
    "disallowedpeople": [
        93
    ],
    // the type name which is presented to the user for filtering
    "typefacet": "Page"
}

If the object change event relates to a profile, then the JSON payload will vary slightly as show below.

"documentdata": {
    // the type property for people is always 'Person'
    "type": "Person",
    // the typefacet property for people is always 'Person'
    "typefacet": "Person",
    // the internal user id of this person record
    "referenceid": 264,
    // the full, unique identifier for this person record
    "uid": "Person_264",
    // the person's full name for this record
    "title": "John Richards",
    // the initials for this person record
    "initials": "JPR",
    // the initials for this person record
    "initialsforsearch": "JPR",
    // the person's full name stripped of any special caharacters and lower cased 
    "titleforsorting": "john richards",
    // the first character of titleforsorting made uppercase
    "titlechar": "J",
    // the person's specified job title
    "jobtitle": "VP, Domestic Operations",
    // the person's specified job title (internal use)
    "jobtitlefacet": "VP, Domestic Operations",
    // the user id of this person's manager
    "managerId": "276",
    // the first name of this person's manager
    "managerfirstname": "Daniel",
    // the surname of this person's manager
    "managersurname": "Jones",
    // the name of this person's primary department
    "primarydepartment": "Senior Management",
    // the name of this person's primary company
    "primarycompany": "Interact Research Group",
    // the name of this person's primary location
    "primarylocation": "New York",
    // the name of this person's primary department (internal use)
    "primarydepartmentfacet": "Senior Management",
    // the name of this person's primary company (internal use)
    "primarycompanyfacet": "Interact Research Group",
    // the name of this person's primary location (internal use)
    "primarylocationfacet": "New York",
    // this person's primary email address
    "email1": "[email protected]",
    // this person's work telephone number
    "phonework": "020 8555 3422",
    // this person's mobile telephone number
    "phonemobile": "+44123123123",
    // this person's telephone extension number
    "extension": "",
    // an array of all telephone numbers associated with this person, stripped of spaces and special characters
    "sanitisedphonenumbers": [
        "44123123123",
        "2085553422"
    ],
    // the asset id of this person
    "avatar": "250196",
    // the section if of the people directory module in Interact, used internally for permissions
    "sectionid": 501,
    // the datetime at which it is meaningful to show this person in search results
    "startdate": "2020-06-10T14:53:37.4087482Z",
     // the datetime at which it is no longer meaningful to show this person in search results
    "enddate": "0001-01-01T00:00:00Z",
    // this person's biography/job description
    "summary": "I can speak Spanish!",
    // an array of expertise titles associated with this person
    "expertise": [
        "Spanish",
        "Customer Care/Account Management",
        "Word",
        "Power Point Presentation",
        "Presentations"
    ],
    // an array of expertise titles associated with this person (internal use)
    "expertisefacet": [
        "Spanish",
        "Customer Care/Account Management",
        "Word",
        "Power Point Presentation",
        "Presentations"
    ],
    // an array of interests titles associated with this person
    "interests": [
        "Golf",
        "Sking",
        "Classical"
    ],
    // an array of interests titles associated with this person (internal use)
    "interestsfacet": [
        "Golf",
        "Sking",
        "Classical"
    ],
     // internal css class indicator
    "icon": "icon-user",
    // a 'space' delimted  list of additional department titles associated with this person
    "additionaldepartments": "",
    // a 'space' delimted  list of additional company titles associated with this person
    "additionalcompanies": "",
    // a 'space' delimted  list of additional location titles associated with this person
    "additionallocations": "",
    "url": "/Interact/Pages/Modules/Directory/Entry.aspx?person=264",
    // whether the people directory module in Interact is publicly accessible
    "ispublic": true,
    // an array of organisation ids which are permitted to view the item (if ispublic is true, this field will not be present)
    "allowedorganisations": [
        203,
        264
    ],
    // an array of user ids which are permitted to view the item (if ispublic is true, this field will not be present)
    "allowedpeople": [
        281
    ],
    // an array of user ids which are excluded from viewing the item (if ispublic is false, this field may not be present)
    "disallowedorganisations": [
        123,
        644
    ],
    // an array of user ids which are permitted to view the item (if ispublic is false, this field may not be present)
    "disallowedpeople": [
        93
    ],
    // a series of fields suffixed '_custom' which are titled as per the additional / custom fields configured within the intranet, and the value assigned to each field
    "fire_marshall_custom": "false",
    "first_aider_custom": "false",
    "account_manager_custom": ""
}