[basex-talk] Question about baseX add "/path/to/filesystem/directory"
Hello I'm experiencing a trouble with the add "/path/to/filesystem/directory" on a large directory structure with thousands of files. The result is a strange error : > add "/data/PARTAGE/DOSSIERS EC&T/PC" "Configurations2/accelerator/current.xml" (Line 1): No text allowed before root element. And in the directory /data/PARTAGE/DOSSIERS EC&T/PC, no Configurations2 directory... I think a file is having a problem but with a thousand of files, how to know which of them ? On another directory, the add function works but finds xml files that aren't in the directory structure (find . -name "xxx" doesn't find them as basex finds !!!)... Is the "add function" fragile on a directory ? Many thanks in advance JMA
[basex-talk] Concurrency model
What is the best way to manage multiple users in a multi-threaded environment like servlets?
Re: [basex-talk] Returning text matches
On Thu, 2015-12-10 at 17:24 +0100, Christian Grün wrote: > Hi Ron, > > You can use ft:mark and ft:extract to highlights matches in a > full-text result [1]. And what happens if a full text match crosses an element boundary, e.g. a search for "blue socks" matching, He wore dark blue socks that day. could not return, He wore dark blue socks that day. (Yes, I should test it, sorry! but the docs should probably mention it. it was a big part of the XPath/XQuery Full Text design early on) Liam -- Liam R. E. Quin The World Wide Web Consortium (W3C)
Re: [basex-talk] Returning text matches
Thanks, Christian. The following works as expected (the output contains the matches with their surrounding context) for $study in db:open('CTGov')/clinical_study let $result := $study contains text { 'genomics', 'genomic', 'transcriptome', 'exome', 'whole genome', 'microarray', 'proteome', 'metabolome' } let score $score := $result where $score >= 0.01 return ft:extract($study//*[text() contains text { 'genomics', 'genomic', 'transcriptome', 'exome', 'whole genome', 'microarray', 'proteome', 'metabolome' }]) Is it possible to combine the two patterns (i.e., the selection criteria and the extraction in the return) into a single one? Perhaps this is what ft:mark is supposed to do but I could not get it to work... Best, Ron On December 10, 2015 at 11:24:38 AM, Christian Grün (christian.gr...@gmail.com) wrote: Hi Ron, You can use ft:mark and ft:extract to highlights matches in a full-text result [1]. Hope this helps, Christian [1] http://docs.basex.org/wiki/Full-Text_Module#ft:mark On Thu, Dec 10, 2015 at 4:33 PM, Ron Katriel wrote: > Hi, > > Is there a way to return all matches when searching a large XML structure? > For example, return the genomic keywords that matched anywhere in $study > using the following query: > > for $study in db:open('CTGov')/clinical_study > let $result := $study contains text { 'genomics', 'genomic', > 'transcriptome', 'exome', 'whole genome', 'microarray', 'proteome', > 'metabolome' } > let score $score := $result > where $score >= 0.01 > return $study/id_info/nct_id (: this is just the Study ID :) > > Ideally it would include an indication of where in the tree the matches are > (e.g., that ‘exome’ was found in $study/official_title and in > $article/keywords). > > This could presumably be done using regular expression matching (after > serializing the tree into a text string) but it does not seem an elegant > solution. > > Thanks, > Ron >
Re: [basex-talk] Returning text matches
Hi Ron, You can use ft:mark and ft:extract to highlights matches in a full-text result [1]. Hope this helps, Christian [1] http://docs.basex.org/wiki/Full-Text_Module#ft:mark On Thu, Dec 10, 2015 at 4:33 PM, Ron Katriel wrote: > Hi, > > Is there a way to return all matches when searching a large XML structure? > For example, return the genomic keywords that matched anywhere in $study > using the following query: > > for $study in db:open('CTGov')/clinical_study > let $result := $study contains text { 'genomics', 'genomic', > 'transcriptome', 'exome', 'whole genome', 'microarray', 'proteome', > 'metabolome' } > let score $score := $result > where $score >= 0.01 > return $study/id_info/nct_id (: this is just the Study ID :) > > Ideally it would include an indication of where in the tree the matches are > (e.g., that ‘exome’ was found in $study/official_title and in > $article/keywords). > > This could presumably be done using regular expression matching (after > serializing the tree into a text string) but it does not seem an elegant > solution. > > Thanks, > Ron >
[basex-talk] Returning text matches
Hi, Is there a way to return all matches when searching a large XML structure? For example, return the genomic keywords that matched anywhere in $study using the following query: for $study in db:open('CTGov')/clinical_study let $result := $study contains text { 'genomics', 'genomic', 'transcriptome', 'exome', 'whole genome', 'microarray', 'proteome', 'metabolome' } let score $score := $result where $score >= 0.01 return $study/id_info/nct_id (: this is just the Study ID :) Ideally it would include an indication of where in the tree the matches are (e.g., that ‘exome’ was found in $study/official_title and in $article/keywords). This could presumably be done using regular expression matching (after serializing the tree into a text string) but it does not seem an elegant solution. Thanks, Ron