Hi all BaseX users,
When I search for 'YET_ANOTHER_SILLY_KEYWORD', ft:search gives me all text nodes containing any of the YET ANOTHER SILLY KEYWORD words. I tried the different search modes, but could not find a way to get ft:search return only the text nodes containing the concatenation. Does anybody have a solution ?
Best regards,
[MAIF]
Fabrice ETANCHAUD
Unité Etudes Informatiques - MAIF VIE
50 avenue Salvador Allende 79029 Niort Cedex 9
fabrice.etanchaud@maif.fr
MAIF.FRhttp://www.maif.fr/ | Retrouvez-nous aussi sur [Facebook] https://www.facebook.com/MAIFassureur [Twitter] https://twitter.com/MAIF [Youtube] https://www.youtube.com/user/maif
Hi Fabrice -
Maybe something like ft:search("the-database", "YET_ANOTHER_SILLY_KEYWORD", map { "mode": "phrase", "ordered": true() })?
I confess that I don't know the full text module behavior at all, but I coincidentally had it open... Anyway, I hope that's helpful. Best, Bridger
On Fri, Jun 5, 2020 at 8:38 AM ETANCHAUD Fabrice fabrice.etanchaud@maif.fr wrote:
Hi all BaseX users,
When I search for 'YET_ANOTHER_SILLY_KEYWORD', ft:search gives me all text nodes containing any of the YET ANOTHER SILLY KEYWORD words. I tried the different search modes, but could not find a way to get ft:search return only the text nodes containing the concatenation. Does anybody have a solution ?
Best regards,
[image: MAIF]
*Fabrice ETANCHAUD*
Unité Etudes Informatiques - MAIF VIE
50 avenue Salvador Allende 79029 Niort Cedex 9
fabrice.etanchaud@maif.fr
*MAIF*.FR http://www.maif.fr/ | Retrouvez-nous aussi sur [image: Facebook] https://www.facebook.com/MAIFassureur[image: Twitter] https://twitter.com/MAIF[image: Youtube] https://www.youtube.com/user/maif
Fabrice - my apologies. I see now that my suggestion was very naive. I hope I didn't waste your time. Sorry for the noise. Best, Bridger
On Fri, Jun 5, 2020 at 10:23 AM Bridger Dyson-Smith bdysonsmith@gmail.com wrote:
Hi Fabrice -
Maybe something like ft:search("the-database", "YET_ANOTHER_SILLY_KEYWORD", map { "mode": "phrase", "ordered": true() })?
I confess that I don't know the full text module behavior at all, but I coincidentally had it open... Anyway, I hope that's helpful. Best, Bridger
On Fri, Jun 5, 2020 at 8:38 AM ETANCHAUD Fabrice < fabrice.etanchaud@maif.fr> wrote:
Hi all BaseX users,
When I search for 'YET_ANOTHER_SILLY_KEYWORD', ft:search gives me all text nodes containing any of the YET ANOTHER SILLY KEYWORD words. I tried the different search modes, but could not find a way to get ft:search return only the text nodes containing the concatenation. Does anybody have a solution ?
Best regards,
[image: MAIF]
*Fabrice ETANCHAUD*
Unité Etudes Informatiques - MAIF VIE
50 avenue Salvador Allende 79029 Niort Cedex 9
fabrice.etanchaud@maif.fr
*MAIF*.FR http://www.maif.fr/ | Retrouvez-nous aussi sur [image: Facebook] https://www.facebook.com/MAIFassureur[image: Twitter] https://twitter.com/MAIF[image: Youtube] https://www.youtube.com/user/maif
On Fri, 2020-06-05 at 12:38 +0000, ETANCHAUD Fabrice wrote:
Hi all BaseX users,
When I search for 'YET_ANOTHER_SILLY_KEYWORD', ft:search gives me all text nodes containing any of the YET ANOTHER SILLY KEYWORD words.
Does it work to put the phrase in double quotes?
ft:search(...'"the-phrase_here"'
?
Or use, //p[. contains text "the_word_with_underscores"] ?
(i've use contains text followed by ft:mark() to do match highlighting)
Liam
basex-talk@mailman.uni-konstanz.de