Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created September 22, 2016 17:30
Show Gist options
  • Save ableasdale/50f938ea468f3913a88cd2d42e526c96 to your computer and use it in GitHub Desktop.
Save ableasdale/50f938ea468f3913a88cd2d42e526c96 to your computer and use it in GitHub Desktop.
Search:Search relevance test
xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy";
xdmp:document-insert("/doc1.xml",text{"101 dalmatians is a fun story about dogs escaping from the hands of Cruella"}),
xdmp:document-insert("/doc2.xml",text{"Fun, fun, fun by the Beach Boys"}),
xdmp:document-insert("/doc3.xml",text{"Dogs are fun"}),
xdmp:document-insert("/doc4.xml",text{"Fun"}),
xdmp:document-insert("/doc5.xml",text{"Dogs are fun. Dogs are fun."}),
search:search("fun")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment