Created
June 8, 2012 13:12
-
-
Save ryanjdew/2895537 to your computer and use it in GitHub Desktop.
Example cts:word-query without synonym option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| element results { | |
| for $i in cts:search(/content, | |
| cts:word-query(('Jesus Christ','Christ','Messiah','Savior','Redeemer','Lord'),('case-sensitive')) | |
| ) | |
| [1 to 10]/(element title { attribute score {cts:score(.)}, string(title)}) | |
| order by $i/@score descending, $i ascending | |
| return $i | |
| } | |
| (: => | |
| <results> | |
| <title score="58453">The Messianic Expectation</title> | |
| <title score="58197">The Book of Mormon on Christ’s Role as Redeemer</title> | |
| <title score="58069">“We Prophesy of Christ”: The Law of Witnesses in 2 Nephi</title> | |
| <title score="57557">“The Light and Life of the World”</title> | |
| <title score="56576">Jesus the Christ: Our Master and More</title> | |
| <title score="56235">He Lives! The Witness of Latter-day Prophets</title> | |
| <title score="56149">“Another Testament of Jesus Christ”</title> | |
| <title score="55509">Special Witnesses of Christ</title> | |
| <title score="55339">One Family’s Testimony of Christ</title> | |
| <title score="54997">The Establishment of Zion (Isaiah 1–12)</title> | |
| </results> | |
| :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment