Web Connector 23.2

# PageRankLuaScript

The path of a Lua script that contains a custom algorithm to use for ranking pages when you set RankPages to `TRUE`.

The script must contain a function named `calculatePageRank` that returns the rank for a page. The function should look like this:

    function calculatePageRank(url, depth, links, currentTime, modifiedTime, daysSinceModification)
      -- do some calculations
      return thePageRank
    end

The arguments supplied to the function are:

Argument | Description
--- | ---
`url` | The page URL.
`depth` | The depth of the page (`0` specifies that the connector started crawling from the page, `1` specifies that the page was reached by following one link, `2` specifies that the page was reached by following two links, and so on).
`links` | The number of links from other pages to this page.
`currentTime` | The current time, in epoch seconds.
`modifiedTime` | The time when the page was last modified, in epoch seconds. This value is obtained from the page or HTTP headers (see Date Parameters). If the connector cannot obtain a date from the page or HTTP headers, this value will be the time at which the page was processed.
`daysSinceModification` | The number of days since the page was last modified. If the connector cannot obtain the last modification time, this value will be zero.

The connector installation includes an example Lua script, `RankPage.Lua`, which demonstrates the default algorithm used by the connector.

Type: | String
Default: |
Required: | No
Configuration Section: | TaskName or FetchTasks
Example: | `PageRankLuaScript=myCustomPageRankAlgorithm.lua`
See Also: | RankPages

Copyright 2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Web Connector 23.2

Topic Title: PageRankLuaScript