(no subject)
Friday, 5 April 2013 · 2 messages · last reply 12 Apr 2013
JB
John Best5 Apr 2013 14:25 #
Dear Team,
Following is my query -
for $x in db:fulltext('Doc', 'Molecular Biology')/ancestor::*:Doc
return $x/ArticleNoThis query will return all the ArticleNo having the words "Molecular Biology"
The output of this query is like a PHRASE... where the phrase is "Molecular Biology"
Now I want to list all the ArticleNo which might have word "Molecular" OR/AND "Biology"
How can I get this using the above query... ??
--
Have a nice day
JBest
CG
Christian Grün12 Apr 2013 12:27 #
Hi John,
Quoted text · John Best · 2 lines
> for $x in db:fulltext('Doc', 'Molecular Biology')/ancestor::*:Doc > return $x/ArticleNo
"intersect", "union" and "except" can be used to perform set-based logical operations:
let $a := db:fulltext('Doc', 'Molecular')
let $b := db:fulltext('Doc', 'Biology')
let $c := $a union $b
return $c/ancestor::*:Doc/ArticleNoHope this helps,
Christian
Written for BaseX 7.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery