MarkLogic 12 Product Documentation
admin:database-index-excluded-path

admin:database-index-excluded-path(
   $path-expression as xs:string,
   $collections as xs:string*,
   $directories as xs:string*
) as element(db:excluded-path)

Summary

This function constructs an index-excluded-path specification. Excluded paths allow users to exclude specific parts of documents from being indexed, reducing resource consumption for content that does not need to be searched.

Parameters
path-expression A valid and indexable XPath expression identifying the content to be excluded from indexing.
collections A set of collection URIs.
directories A set of directory URIs.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  admin:database-index-excluded-path("/root/embeddings", 
                                      ("vector", "vector-json"), 
                                      ("/vec/"))
  =>
    <excluded-path xmlns="http://marklogic.com/xdmp/database">
      <excluded-path-expression>/root/embeddings</excluded-path-expression>
      <excluded-collections>
        <excluded-collection>vector</excluded-collection>
        <excluded-collection>vector-json</excluded-collection>
      </excluded-collections>
      <excluded-directories>
        <excluded-directory>/vec/</excluded-directory>
      </excluded-directories>
    </excluded-path>
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy