Hi Fabrice,

Thanks a lot. How come I forgot this !!!

Now my query will be -

for $x in
ft:search("Articles", ("electromagnetic waves"), map { 'mode':='Phrase'
})/ancestor::Doc
intersect
ft:search("Articles", ("electromagnetic particles"), map { 'mode':='Phrase'
})/ancestor::Doc
return $x

Again thanks a lot :)


On Fri, Nov 28, 2014 at 3:11 PM, Fabrice Etanchaud <[email protected]>
wrote:

>  Hi John,
>
>
>
> What about using the intersect operator on the two result sets ?
>
>
>
> Best regards,
>
> Fabrice Etanchaud
>
> Questel/Orbit
>
>
>
>
>
> *De :* [email protected] [mailto:
> [email protected]] *De la part de* John Best
> *Envoyé :* vendredi 28 novembre 2014 10:35
> *À :* [email protected]
> *Objet :* [basex-talk] How to use ft:search() for querying 2 or more
> phrases?
>
>
>
> Hi BaseX Team,
>
> The subject itself is explanatory. I have following query -
>
> ft:search("Articles", ("electromagnetic waves"), map { 'mode':='Phrase'
> })/ancestor::Doc
> return $x
>
> This query searches for "electromagnetic waves" as a phrase. I want to
> search another phrase "electromagnetic particles" with the previous phrase.
>
>   List only those Articles having both these phrases.
>
>
> --
>
> Have a nice day
> JBest
>
>


-- 
Have a nice day
JBest

Reply via email to