Re: [basex-talk] Set Operator Examples

2013-09-26 Thread Arve Gengelbach
 I had a typo in my example. The return did not call the map2 version. With 
 it, the results were (now on 7.7 and Windows 7)

And I posted the wrong version. Usage of ! within map:new() is not as
fast as a flowr expression (in general).

BUT neither of the “fastest two” functions yields valid results
(e.g. take 2,2,3 for $a and empty sequence for $b)
Arto, I hope replacing one flowr expression with the simple map operator
can improve speed in your use-cases. So hopefully this is fastest for you:

declare function local:difference-maps($a, $b) {
  let $m1 := map:new(for $i in $a return map:entry($i, true()))
  let $m2 := map:new(for $i in $b return map:entry($i, false()))
  let $m3 := map:new(($m1, $m2))
  return map:keys($m3) ! (if ($m3(.)) then . else ())
};

As the speed gain depends on the spreading of the data, rewriting set
operations needs proove of efficency for any given data.
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] Full Text Module - ft:search function

2013-09-26 Thread John Best
Dear Christian,

The syntax of the ft:search is -

*ft:search($db as xs:string, $terms as item()*, $options as item()) as
text()**

In the $options part, I have seen various options like -
Any Word, All Words, Phrase (for Exact Phrase), fuzzy and wildcards.

These are really very good features. I am using them extensively.

But one thing, I think, is missing and that is the Window/Distance Options
for proximity search.

Can these options be implemented.. ??



-- 
Have a nice day
JBest
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] BaseX http running single threaded?

2013-09-26 Thread France Baril
Different issues than, my global lock has been set to false all along and I
have the problems even on read-only operations.

I'm saving my PDF on the file system, redirecting and then loading it in
the PdfReview DB in an update operation just to make sure that I don't have
a write lock on the DB when the images are grabbed.

Thanks for sharing!


On Wed, Sep 25, 2013 at 2:14 PM, Joe Templeman j...@inkling.com wrote:

 I found that it is locking up because of the database global 
 lockhttp://docs.basex.org/wiki/Options#GLOBALLOCK which
 locks during any updating function. On the long updating call that was
 happening first, it was grabbing the lock and so every subsequent request
 was being blocked until the update had finished. I think the solution for
 us is to turn it off since we're never updating any content in place, only
 adding content, and that content is static so it doesn't matter if two
 requests clobber the data.




 On Wed, Sep 25, 2013 at 9:30 AM, France Baril 
 france.ba...@architextus.com wrote:

 I'm having similar issues where everything freezes on an http request
 done from inside a restxq function, but only if certain conditions are
 present.

 The conditions are not easy to pinpoint. However, they affect our ability
 to validate content against modular dtds/xsds, to apply modular .xsl  and
 .xsl that were grabbing pieces of content with doc(restxq...) accesses, and
 to create PDF with a FOP module because the fo references images stored as
 raw files and only accessible by http://..rest/ paths.

 I'm in the 3rd week of refactoring our application so we can migrate to
 7.7. I believe I am half way there. The main task is to augment content
 through query before the document is sent to .xsl to remove all needs for
 the use of the doc(restxq) functions. We also find that we can no longer
 have a self-contained application and that we have to create new steps to
  export pieces of content and applicative files to the file system.

 Not having a self-contained application is a huge step back for us where
 we have to start considering that different OS handle different paths
 differently. For example, Windows is killing our capitalization on content
 re-import which multiplies the folder structures (looks like we'll need to
 naming conventions).

 I'm hoping someone can provide a case simple enough to be submitted and
 that will help pinpoint the exact source of the problem and resolve the
 issue. Our refactoring for doc(restxq) will be done by there, but not
 having to export applicative files and images for processing would bring us
 back to a neat/clean self-contained application.

 Regards,

 France



 On Fri, Sep 20, 2013 at 6:13 PM, Joe Templeman j...@inkling.com wrote:

 Hi all,

 I'm having trouble with the running a restxq API, set up as either a
 stand alone app (using basexhttp) or running the servlet in jetty.

 When I make a request, the server will lazily load in the requested
 content using a small java library that I've built which can take quite a
 while, and unfortunately it completely blocks waiting for this request to
 complete. This means that if I make a request for content which is already
 loaded, which should return in a couple of milliseconds, it instead waits
 for the downloading of the first request to complete before returning.

 I'm sure it's something simple that I'm missing in the config somewhere,
 but I have the threadpool parameters set up in my jetty.xml config file but
 it doesn't seem to make any difference.

 Is this expected behavior? I can't imagine any HTTP server would ever be
 designed to be single threaded...

 Any help is welcome, I've been trying to figure this out for days now.

 Thanks,
 Joe


 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk




 --
 France Baril
 Architecte documentaire / Documentation architect
 france.ba...@architextus.com
 (514) 572-0341





-- 
France Baril
Architecte documentaire / Documentation architect
france.ba...@architextus.com
(514) 572-0341
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Full Text Module - ft:search function

2013-09-26 Thread Christian Grün
 Can these options be implemented.. ??

Yes, they could be implemented, but it may take a while to find a good
formalization of all possible choices. Your suggestions are welcome.
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Set Operator Examples

2013-09-26 Thread Christian Grün
Thanks Arto for the interesting comparisons.

One more rewriting for map2 could be..

  declare function local:map2($a, $b) {
let $m2 := map:new($b ! map:entry(., true()))
return $a[$m2(.)]
  };

..but my assumption is that all rewritings should yield similar
performance, because the flwor expression, predicates and the map
operator are internally basically evaluated the same.

@Andy:

 distinct-values(($arg1, $arg2))
 distinct-values($arg1[.=$arg2])
 distinct-values($arg1[not(.=$arg2)])

the first query should be fast enough, but it may be beneficial to
optimize the (non-)equality test in the next two queries. I’m not
sure, though, if this optimization can be generalized that easily.
___

2013/9/26 Arve Gengelbach a...@basex.org:
 I had a typo in my example. The return did not call the map2 version. With 
 it, the results were (now on 7.7 and Windows 7)

 And I posted the wrong version. Usage of ! within map:new() is not as
 fast as a flowr expression (in general).

 BUT neither of the “fastest two” functions yields valid results
 (e.g. take 2,2,3 for $a and empty sequence for $b)
 Arto, I hope replacing one flowr expression with the simple map operator
 can improve speed in your use-cases. So hopefully this is fastest for you:

 declare function local:difference-maps($a, $b) {
   let $m1 := map:new(for $i in $a return map:entry($i, true()))
   let $m2 := map:new(for $i in $b return map:entry($i, false()))
   let $m3 := map:new(($m1, $m2))
   return map:keys($m3) ! (if ($m3(.)) then . else ())
 };

 As the speed gain depends on the spreading of the data, rewriting set
 operations needs proove of efficency for any given data.
 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] Debian/Ubuntu package

2013-09-26 Thread Stefan Koch

Dear Basex Team,

any plans when the debian package for version 7.7.1 will be released?

Kind regards,

Stefan


___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk