xquery 的 Exist-db 文本模块不起作用
Exist-db text module for xquery not working
我最近在现有数据库 here 上发现了这个用于 xquery 的模块。我需要使用的方法很少,但我没有正确使用它们。我在一个集合中有一系列测试 xml 文件,它们都是这种形式
<root>some string</root>
我正在尝试像这样使用函数 text:fuzzy-match-all
:
xquery version "3.0";
for $doc in collection('/db/testCollection')
return text:fuzzy-match-any($doc,'test')
结果我收到空数组,我至少有一个 xml 文件,其值是 test
。我也试过这样的函数 text:fuzzy-index-terms
xquery version "3.0";
text:fuzzy-index-terms("test")
再一次,我没有收到任何结果。我做错了什么?
遗留的全文索引已在几年前从 eXist-db 中删除。
您应该查看 eXist-db 的 Lucene 全文索引的文档:http://www.exist-db.org/exist/apps/doc/lucene.xml
我最近在现有数据库 here 上发现了这个用于 xquery 的模块。我需要使用的方法很少,但我没有正确使用它们。我在一个集合中有一系列测试 xml 文件,它们都是这种形式
<root>some string</root>
我正在尝试像这样使用函数 text:fuzzy-match-all
:
xquery version "3.0";
for $doc in collection('/db/testCollection')
return text:fuzzy-match-any($doc,'test')
结果我收到空数组,我至少有一个 xml 文件,其值是 test
。我也试过这样的函数 text:fuzzy-index-terms
xquery version "3.0";
text:fuzzy-index-terms("test")
再一次,我没有收到任何结果。我做错了什么?
遗留的全文索引已在几年前从 eXist-db 中删除。
您应该查看 eXist-db 的 Lucene 全文索引的文档:http://www.exist-db.org/exist/apps/doc/lucene.xml