> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Subversion V2

> The Subversion V2 connector requires a Subversion client that is compatible with JavaHL.

export const schema = {
  "category": "Other",
  "categoryPriority": 1,
  "description": "Crawls documents in a Subversion repository.",
  "properties": {
    "category": {
      "default": "Repository",
      "hints": ["hidden", "readonly"],
      "title": "Category",
      "type": "string"
    },
    "connector": {
      "description": "Connector Type.",
      "hints": ["hidden"],
      "minLength": 1,
      "title": "Connector Type",
      "type": "string"
    },
    "description": {
      "description": "Optional description for this datasource.",
      "title": "Description",
      "type": "string"
    },
    "id": {
      "description": "Unique name for this datasource.",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "title": "Datasource ID",
      "type": "string"
    },
    "pipeline": {
      "description": "Name of an existing index pipeline for processing documents.",
      "minLength": 1,
      "title": "Pipeline ID",
      "type": "string"
    },
    "properties": {
      "description": "Datasource configuration properties",
      "properties": {
        "aliasExpiration": {
          "default": 1,
          "description": "The number of crawls after which an alias will expire. The default is 1 crawl.",
          "hints": ["advanced"],
          "title": "Alias expiration",
          "type": "integer"
        },
        "chunkSize": {
          "default": 1,
          "description": "The number of items to batch for each round of fetching. A higher value can make crawling faster, but memory usage is also increased. The default is 1.",
          "hints": ["advanced"],
          "title": "Fetch batch size",
          "type": "integer"
        },
        "collection": {
          "description": "Collection documents will be indexed to.",
          "hints": ["hidden"],
          "pattern": "^[a-zA-Z0-9_-]+$",
          "title": "Collection",
          "type": "string"
        },
        "commitAfterItems": {
          "default": 10000,
          "description": "Commit the crawlDB to disk after this many items have been received. A smaller number here will result in a slower crawl because of commits to disk being more frequent; conversely, a larger number here will cause a resumed job after a crash to need to recrawl more records.",
          "hints": ["advanced"],
          "title": "Commit After This Many Items",
          "type": "integer"
        },
        "crawlDBType": {
          "default": "on-disk",
          "description": "The type of crawl database to use, in-memory or on-disk.",
          "enum": ["in-memory", "on-disk"],
          "hints": ["advanced"],
          "title": "Crawl database type",
          "type": "string"
        },
        "db": {
          "description": "Type and properties for a ConnectorDB implementation to use with this datasource.",
          "hints": ["hidden"],
          "properties": {
            "aliases": {
              "default": false,
              "description": "Keep track of original URI-s that resolved to the current URI. This negatively impacts performance and size of DB.",
              "title": "Process Aliases?",
              "type": "boolean"
            },
            "inlinks": {
              "default": false,
              "description": "Keep track of incoming links. This negatively impacts performance and size of DB.",
              "title": "Process Inlinks?",
              "type": "boolean"
            },
            "inv_aliases": {
              "default": false,
              "description": "Keep track of target URI-s that the current URI resolves to. This negatively impacts performance and size of DB.",
              "title": "Process Inverted Aliases?",
              "type": "boolean"
            },
            "type": {
              "default": "com.lucidworks.connectors.db.impl.MapDbConnectorDb",
              "description": "Fully qualified class name of ConnectorDb implementation.",
              "minLength": 1,
              "title": "Implementation Class Name",
              "type": "string"
            }
          },
          "required": ["type"],
          "title": "Connector DB",
          "type": "object"
        },
        "dedupe": {
          "default": false,
          "description": "If true, documents will be deduplicated. Deduplication can be done based on an analysis of the content, on the content of a specific field, or by a JavaScript function. If neither a field nor a script are defined, content analysis will be used.",
          "hints": ["advanced"],
          "title": "Dedupe documents",
          "type": "boolean"
        },
        "dedupeField": {
          "description": "Field to be used for dedupe. Define either a field or a dedupe script, otherwise the full raw content of each document will be used.",
          "hints": ["advanced"],
          "title": "Dedupe field",
          "type": "string"
        },
        "dedupeSaveSignature": {
          "default": false,
          "description": "If true,the signature used for dedupe will be stored in a 'dedupeSignature_s' field. Note this may cause errors about 'immense terms' in that field.",
          "hints": ["advanced"],
          "title": "Save dedupe signature",
          "type": "boolean"
        },
        "dedupeScript": {
          "description": "Custom javascript to dedupe documents. The script must define a 'genSignature(content){}' function, but can use any combination of document fields. The function must return a string.",
          "hints": ["advanced", "code", "code/javascript"],
          "title": "Dedupe script",
          "type": "string"
        },
        "delete": {
          "default": true,
          "description": "Set to true to remove documents from the index when they can no longer be accessed as unique documents.",
          "title": "Delete dead URIs",
          "type": "boolean"
        },
        "deleteErrorsAfter": {
          "default": -1,
          "description": "Number of fetch failures to tolerate before removing a document from the index. The default of -1 means no fetch failures will be removed.",
          "title": "Fetch failure allowance",
          "type": "integer"
        },
        "depth": {
          "default": -1,
          "description": "Number of levels in a directory or site tree to descend for documents.",
          "title": "Max crawl depth",
          "type": "integer"
        },
        "diagnosticMode": {
          "default": false,
          "description": "Enable to print more detailed information to the logs about each request.",
          "hints": ["advanced"],
          "title": "Diagnostic mode",
          "type": "boolean"
        },
        "emitThreads": {
          "default": 5,
          "description": "The number of threads used to send documents from the connector to the index pipeline. The default is 5.",
          "title": "Emit threads",
          "type": "integer"
        },
        "excludeExtensions": {
          "description": "File extensions that should not to be fetched. This will limit this datasource to all extensions except this list.",
          "items": {
            "type": "string"
          },
          "title": "Excluded file extensions",
          "type": "array"
        },
        "excludeRegexes": {
          "description": "Regular expressions for URI patterns to exclude. This will limit this datasource to only URIs that do not match the regular expression.",
          "items": {
            "type": "string"
          },
          "title": "Exclusive regexes",
          "type": "array"
        },
        "f.subversion_batch_size": {
          "default": 100,
          "description": "Number of records to fetch in each batch request.",
          "hints": ["advanced"],
          "title": "Subversion number of revisions in batch",
          "type": "integer"
        },
        "f.subversion_configuration_directory": {
          "description": "Path to a configuration directory that includes a file named 'servers' to support self-signed certificates. If the Subversion repository does not use SSL or does not use self-signed certificates, this can be left empty.",
          "title": "Subversion configuration directory",
          "type": "string"
        },
        "f.subversion_native_library": {
          "default": "fusion-svn-binaries",
          "description": "Path to the libsvnjavahl-1.so (Linux) or libsvnjavahl-1.dll (Windows) library. If using the libaries included with Fusion, you do not need to specify the path.",
          "title": "Subversion JavaHL library path",
          "type": "string"
        },
        "f.subversion_password": {
          "description": "Password for user, if required.",
          "hints": ["secret"],
          "title": "Subversion Password",
          "type": "string"
        },
        "f.subversion_username": {
          "description": "Username with permissions to access the repository, if the Subversion repository requires authentication.",
          "title": "Subversion Username",
          "type": "string"
        },
        "failFastOnStartLinkFailure": {
          "default": true,
          "description": "If true, when Fusion cannot connect to any of the provided start links, the crawl is stopped and an exception logged.",
          "hints": ["advanced"],
          "title": "Fail crawl if start links are invalid",
          "type": "boolean"
        },
        "fetchDelayMS": {
          "default": 0,
          "description": "Number of milliseconds to wait between fetch requests. The default is 0. This property can be used to throttle a crawl if necessary.",
          "hints": ["advanced"],
          "title": "Fetch delay",
          "type": "integer"
        },
        "fetchThreads": {
          "default": 5,
          "description": "The number of threads to use during fetching. The default is 5.",
          "title": "Fetch threads",
          "type": "integer"
        },
        "forceRefresh": {
          "default": false,
          "description": "Set to true to recrawl all items even if they have not changed since the last crawl.",
          "hints": ["advanced"],
          "title": "Force recrawl",
          "type": "boolean"
        },
        "forceRefreshClearSignatures": {
          "default": true,
          "description": "If true, signatures will be cleared if force recrawl is enabled.",
          "hints": ["advanced"],
          "title": "Clear signatures",
          "type": "boolean"
        },
        "includeExtensions": {
          "description": "File extensions to be fetched. This will limit this datasource to only these file extensions.",
          "items": {
            "type": "string"
          },
          "title": "Included file extensions",
          "type": "array"
        },
        "includeRegexes": {
          "description": "Regular expressions for URI patterns to include. This will limit this datasource to only URIs that match the regular expression.",
          "items": {
            "type": "string"
          },
          "title": "Inclusive regexes",
          "type": "array"
        },
        "initial_mapping": {
          "category": "Field Transformation",
          "categoryPriority": 7,
          "description": "Provides mapping of fields before documents are sent to an index pipeline.",
          "hints": ["advanced"],
          "properties": {
            "condition": {
              "description": "Define a conditional script that must result in true or false. This can be used to determine if the stage should process or not.",
              "hints": ["code", "code/javascript", "advanced"],
              "title": "Condition",
              "type": "string"
            },
            "label": {
              "description": "A unique label for this stage.",
              "hints": ["advanced"],
              "maxLength": 255,
              "title": "Label",
              "type": "string"
            },
            "mappings": {
              "default": [{
                "operation": "move",
                "source": "charSet",
                "target": "charSet_s"
              }, {
                "operation": "move",
                "source": "fetchedDate",
                "target": "fetchedDate_dt"
              }, {
                "operation": "move",
                "source": "lastModified",
                "target": "lastModified_dt"
              }, {
                "operation": "move",
                "source": "signature",
                "target": "dedupeSignature_s"
              }, {
                "operation": "move",
                "source": "length",
                "target": "length_l"
              }, {
                "operation": "move",
                "source": "mimeType",
                "target": "mimeType_s"
              }, {
                "operation": "move",
                "source": "parent",
                "target": "parent_s"
              }, {
                "operation": "move",
                "source": "owner",
                "target": "owner_s"
              }, {
                "operation": "move",
                "source": "group",
                "target": "group_s"
              }],
              "description": "List of mapping rules",
              "hints": ["advanced"],
              "items": {
                "properties": {
                  "operation": {
                    "default": "copy",
                    "description": "The type of mapping to perform: move, copy, delete, add, set, or keep.",
                    "enum": ["copy", "move", "delete", "set", "add", "keep"],
                    "hints": ["advanced"],
                    "title": "Operation",
                    "type": "string"
                  },
                  "source": {
                    "description": "The name of the field to be mapped.",
                    "hints": ["advanced"],
                    "title": "Source Field",
                    "type": "string"
                  },
                  "target": {
                    "description": "The name of the field to be mapped to.",
                    "hints": ["advanced"],
                    "title": "Target Field",
                    "type": "string"
                  }
                },
                "required": ["source"],
                "type": "object"
              },
              "title": "Field Mappings",
              "type": "array"
            },
            "reservedFieldsMappingAllowed": {
              "default": false,
              "hints": ["advanced"],
              "title": "Allow System Fields Mapping?",
              "type": "boolean"
            },
            "skip": {
              "default": false,
              "description": "Set to true to skip this stage.",
              "hints": ["advanced"],
              "title": "Skip This Stage",
              "type": "boolean"
            },
            "unmapped": {
              "description": "If fields do not match any of the field mapping rules, these rules will apply.",
              "hints": ["advanced"],
              "properties": {
                "operation": {
                  "default": "copy",
                  "description": "The type of mapping to perform: move, copy, delete, add, set, or keep.",
                  "enum": ["copy", "move", "delete", "set", "add", "keep"],
                  "hints": ["advanced"],
                  "title": "Operation",
                  "type": "string"
                },
                "source": {
                  "description": "The name of the field to be mapped.",
                  "hints": ["advanced"],
                  "title": "Source Field",
                  "type": "string"
                },
                "target": {
                  "description": "The name of the field to be mapped to.",
                  "hints": ["advanced"],
                  "title": "Target Field",
                  "type": "string"
                }
              },
              "required": ["source"],
              "title": "Unmapped Fields",
              "type": "object"
            }
          },
          "title": "Initial field mapping",
          "type": "object",
          "unsafe": false
        },
        "legalURISchemes": {
          "default": ["*"],
          "description": "Legal URI schemes; use '*' to allow all schemes",
          "hints": ["advanced", "hidden"],
          "items": {
            "type": "string"
          },
          "title": "Legal URI schemes",
          "type": "array"
        },
        "maxItems": {
          "default": -1,
          "description": "Maximum number of documents to fetch. The default (-1) means no limit.",
          "title": "Max items",
          "type": "integer"
        },
        "reevaluateCrawlDbOnStart": {
          "default": false,
          "description": "Reevaluate existing crawldb entries for legality on startup?",
          "hints": ["advanced"],
          "title": "Reevaluate crawldb on start?",
          "type": "boolean"
        },
        "refreshAll": {
          "default": true,
          "description": "Set to true to always recrawl all items found in the crawldb.",
          "hints": ["advanced"],
          "title": "Recrawl all items",
          "type": "boolean"
        },
        "refreshErrors": {
          "default": false,
          "description": "Set to true to recrawl items that failed during the last crawl.",
          "hints": ["advanced"],
          "title": "Recrawl errors",
          "type": "boolean"
        },
        "refreshIDPrefixes": {
          "description": "A prefix to recrawl all items whose IDs begin with this value.",
          "hints": ["advanced"],
          "items": {
            "type": "string"
          },
          "title": "Recrawl ID prefixes",
          "type": "array"
        },
        "refreshIDRegexes": {
          "description": "A regular expression to recrawl all items whose IDs match this pattern.",
          "hints": ["advanced"],
          "items": {
            "type": "string"
          },
          "title": "Recrawl ID regexes",
          "type": "array"
        },
        "refreshOlderThan": {
          "default": -1,
          "description": "Number of seconds to recrawl items whose last fetched date is longer ago than this value.",
          "hints": ["advanced"],
          "title": "Recrawl age",
          "type": "integer"
        },
        "refreshScript": {
          "description": "A JavaScript function ('shouldRefresh()') to customize the items recrawled. ",
          "hints": ["advanced", "code", "code/javascript"],
          "title": "Recrawl script",
          "type": "string"
        },
        "refreshStartLinks": {
          "default": false,
          "description": "Set to true to recrawl items specified in the list of start links.",
          "hints": ["advanced"],
          "title": "Recrawl start links",
          "type": "boolean"
        },
        "retainOutlinks": {
          "default": false,
          "description": "Set to true for links found during fetching to be stored in the crawldb. This increases precision in certain recrawl scenarios, but requires more memory and disk space.",
          "hints": ["advanced"],
          "title": "Retain links in the crawldb",
          "type": "boolean"
        },
        "retryEmit": {
          "default": true,
          "description": "Set to true for emit batch failures to be retried on a document-by-document basis.",
          "hints": ["advanced"],
          "title": "Retry emits",
          "type": "boolean"
        },
        "rewriteLinkScript": {
          "description": "A Javascript function 'rewriteLink(link) { }' to modify links to documents before they are fetched.",
          "hints": ["advanced", "code", "code/javascript"],
          "title": "URI rewrite script",
          "type": "string"
        },
        "startLinks": {
          "description": "One or more starting URIs for this datasource.",
          "items": {
            "type": "string"
          },
          "title": "Start Links",
          "type": "array"
        },
        "trackEmbeddedIDs": {
          "default": true,
          "description": "Track IDs produced by splitters to enable dedupe and deletion of embedded content?",
          "hints": ["advanced"],
          "title": "Track embedded IDs?",
          "type": "boolean"
        }
      },
      "propertyGroups": [{
        "label": "Limit Documents",
        "properties": ["depth", "maxItems", "includeExtensions", "includeRegexes", "excludeExtensions", "excludeRegexes", "delete", "deleteErrorsAfter"]
      }, {
        "label": "Crawl Performance",
        "properties": ["f.subversion_batch_size", "chunkSize", "fetchThreads", "fetchDelayMS", "emitThreads", "retryEmit", "failFastOnStartLinkFailure"]
      }, {
        "label": "Dedupe",
        "properties": ["dedupe", "dedupeSaveSignature", "dedupeField", "dedupeScript"]
      }, {
        "label": "Recrawl Rules",
        "properties": ["refreshAll", "refreshStartLinks", "refreshErrors", "refreshOlderThan", "refreshIDPrefixes", "refreshIDRegexes", "refreshScript", "forceRefresh", "forceRefreshClearSignatures"]
      }, {
        "label": "Crawl History",
        "properties": ["retainOutlinks", "aliasExpiration", "crawlDBType", "commitAfterItems", "reevaluateCrawlDbOnStart"]
      }, {
        "label": "Field Mapping",
        "properties": ["initial_mapping"]
      }],
      "required": ["startLinks"],
      "title": "Properties",
      "type": "object"
    },
    "type": {
      "description": "Datasource type supported by the selected connector type.",
      "hints": ["hidden"],
      "minLength": 1,
      "title": "Datasource Type",
      "type": "string"
    },
    "type_description": {
      "default": "Crawls documents in a Subversion repository.",
      "hints": ["hidden", "readonly"],
      "title": "Type Description",
      "type": "string"
    }
  },
  "required": ["id", "connector", "type", "pipeline", "properties"],
  "title": "Subversion (Deprecated)",
  "type": "object",
  "unsafe": false
};

export const SchemaParamFields = ({schema}) => {
  const sanitize = str => {
    if (typeof str !== "string") return str;
    return str.replace(/^"(.*)"$/s, "$1").replace(/\\/g, "").replace(/"/g, "'");
  };
  const renderMd = str => {
    const s = sanitize(str);
    const text = (/[.!?]\)*$/).test(s) ? s : `${s}.`;
    return text.split(/(\*\*[^*]+\*\*|_[^_]+_|`[^`]+`)/g).map((part, i) => {
      if (part.startsWith("**")) return <strong key={i}>{part.slice(2, -2)}</strong>;
      if (part.startsWith("_")) return <em key={i}>{part.slice(1, -1)}</em>;
      if (part.startsWith("`")) return <code key={i}>{part.slice(1, -1)}</code>;
      return part;
    });
  };
  const {description, properties = {}, required: requiredProps = []} = schema;
  const visibleProps = useMemo(() => Object.entries(properties).filter(([, prop]) => !prop.hints?.includes("hidden")), [properties]);
  const renderProp = ([name, prop]) => {
    const isRequired = requiredProps.includes(name);
    const hasDefault = prop.default !== undefined;
    const rawDefault = prop.default;
    const hints = prop.hints || [];
    const isComplexDefault = hasDefault && (typeof rawDefault === "object" || typeof rawDefault === "string" && (rawDefault.length > 20 || rawDefault.includes('"')));
    const postBadges = [];
    if (prop.title) {
      postBadges.push(<><span className="text-stone-400 dark:text-stone-500">API property: </span>{name}</>);
    }
    const constraints = [];
    if (prop.minimum !== undefined && prop.maximum !== undefined) {
      constraints.push(`Range: ${prop.minimum} – ${prop.maximum}`);
    } else if (prop.minimum !== undefined) {
      constraints.push(`Min: ${prop.minimum}`);
    } else if (prop.maximum !== undefined) {
      constraints.push(`Max: ${prop.maximum}`);
    }
    if (prop.minLength !== undefined && prop.maxLength !== undefined) {
      constraints.push(`Length: ${prop.minLength} – ${prop.maxLength}`);
    } else if (prop.minLength !== undefined) {
      constraints.push(`Min length: ${prop.minLength}`);
    } else if (prop.maxLength !== undefined) {
      constraints.push(`Max length: ${prop.maxLength}`);
    }
    const fieldProps = {
      key: name,
      body: prop.title || name,
      type: prop.type,
      ...postBadges.length > 0 && ({
        post: postBadges
      }),
      ...isRequired && ({
        required: true
      }),
      ...!isComplexDefault && hasDefault ? {
        default: sanitize(String(rawDefault))
      } : {}
    };
    const isObject = prop.type === "object" && prop.properties;
    const isArrayOfObjects = prop.type === "array" && prop.items?.type === "object" && prop.items.properties;
    return <ParamField {...fieldProps}>
        {prop.description && <p>{renderMd(prop.description)}</p>}

        {prop.enum && <p>
            Allowed values: 
            {prop.enum.map((v, i) => <>{i > 0 && ", "}<code key={i}>{String(v)}</code></>)}
          </p>}

        {constraints.length > 0 && <p className="text-stone-500 dark:text-stone-400 text-sm">
            {constraints.join(" · ")}
          </p>}

        {isComplexDefault && <div className="flex">
            <p>
              <strong>Default:</strong>
            </p>
            <pre className="!my-0">
              <code>
                {JSON.stringify(rawDefault, null, 2)}
              </code>
            </pre>
          </div>}

        {isArrayOfObjects && <Expandable title="item properties">
            <SchemaParamFields schema={{
      properties: prop.items.properties,
      required: prop.items.required
    }} />
          </Expandable>}

        {isObject && <Expandable title="properties">
            <SchemaParamFields schema={{
      properties: prop.properties,
      required: prop.required
    }} />
          </Expandable>}
      </ParamField>;
  };
  return <div>
      {description && <p>{renderMd(description)}</p>}

      {visibleProps.map(renderProp)}
    </div>;
};

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/fusion-connectors/connectors/subversion

[mintlify link]: https://doc.lucidworks.com/docs/fusion-connectors/connectors/subversion

[old doc.lw link]: https://doc.lucidworks.com/fusion-connectors/73

<Callout icon="plug" color="#A4C6F7" iconType="solid">
  **Compatible with Fusion version:** 4.2.0 through 5.1.5
</Callout>

Read more about Subversion compatibility with JavaHL at [https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/javahl/README](https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/javahl/README).

<Note>
  Deprecation and removal notice

  This connector is deprecated as of March 12, 2020 and is removed or expected to be removed as of September 12, 2021.

  For more information about deprecations and removals, including possible alternatives, see [Deprecations and Removals](/docs/fusion-connectors/deprecations-and-removals).
</Note>

<LwTemplate />

## Configuration

<Tip>
  When entering configuration values in the UI, use *unescaped* characters, such as `\t` for the tab character. When entering configuration values in the API, use *escaped* characters, such as `\\t` for the tab character.
</Tip>

<SchemaParamFields schema={schema} />
