[basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread John Best
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

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread Fabrice Etanchaud
Hi John, What about using the intersect operator on the two result sets ? Best regards, Fabrice Etanchaud Questel/Orbit De : basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de John Best Envoyé : vendredi 28 novembre 2014 10:35 À :

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread Christian Grün
Hi John, You can specify more than one search string with ft:search [2]: ft:search(Articles, (electromagnetic waves, electromagnetic particles) )/ancestor::Doc In your case, the phrase option is not required, because it creates a single string from all of your search strings. Please see

Re: [basex-talk] CSV : escape character feature

2014-11-28 Thread Fabrice Etanchaud
Thank you so much, Christian. -Message d'origine- De : Christian Grün [mailto:christian.gr...@gmail.com] Envoyé : vendredi 28 novembre 2014 01:15 À : Fabrice Etanchaud Cc : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] CSV : escape character feature Hi Fabrice, my first

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread John Best
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

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread Christian Grün
Well… [2] was supposed to be [1], and [1] should be [2]. You can specify more than one search string with ft:search [2]: ft:search(Articles, (electromagnetic waves, electromagnetic particles) )/ancestor::Doc In your case, the phrase option is not required, because it creates a

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread John Best
Hi Christian, Thanks for the reply. Using intersect, results in 5 Articles. Whereas you suggestion with - ft:search(Articles, (electromagnetic waves, electromagnetic particles) )/ancestor::Doc results in 218 Articles. Why the difference of 213 ? I am checking some of these additional,

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread Fabrice Etanchaud
Dear John Maybe you should add the following option : map { 'mode':'all' } because ’any’ is the default. Best regards, Fabrice De : basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de John Best Envoyé : vendredi 28 novembre 2014 11:32

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread John Best
Hi Team, The first example mentioned here ( http://docs.basex.org/wiki/Full-Text_Module#ft:search ) is - ft:search(db, (A, B), map { mode: all words, distance: { max: 5, unit: words } }) If I modify this to my requirement it will be - ft:search(db, (A, B), map {mode: phrase}) To

Re: [basex-talk] How to use ft:search() for querying 2 or more phrases?

2014-11-28 Thread Christian Grün
Hi John, Sorry, but I'll simply repeat my initial mail: In your case, the phrase option is not required, because it creates a single string from all of your search strings. Please see [1] for more information on the search modes. In other words, your query… If I modify this to my

Re: [basex-talk] New blog post: Origami - XQuery screen scraping with Extractors

2014-11-28 Thread Maximilian Gärber
Nice! Looks clean and compact. I could also think of an additional declarative layer that integrates your approach with something similar to xquery templating in exist-db [1] I've already done a POC implementation of the exist-db templating way using basex. Essentially it is just stepping trough