Today I was looking into some code that was running slower than it should, and I happened across this little tidbit: let $normal := try { xs:int($value) } catch($e) { $value } Yes, MarkLogic extends XQuery to add try/catch, and this is a tremendously useful feature, when [...]
Today I had a complicated function to write. The framework we’re using for this project has unit testing built into it, so for the first time in a long time, I did the Test Driven Development approach: I wrote a set of tests, then wrote code to pass the tests, and then refactored. It felt [...]
While looking at the database configuration in MarkLogic Server, have you ever noticed the Word Query link on the left? (Click Configure -> Databases -> the name of one of your databases -> Word Query.) Ever wonder what it does? Word Query is a simple way to specify what parts of a document should be [...]
This week I’m doing something completely different, and a bit outside my comfort zone — I’m in sales training. No, I’m not planning a career change. My company is sending everyone in the sales organization to this training, and as a pre-sales consultant, here I am. I wasn’t real excited about this. After all, I’m [...]
In many search applications, when we show the results of a user’s search, we also want to display the search that was done by putting the query string into a text box, especially if the search is built up from an advanced search screen. In some cases, we might want to modify the search before [...]
I recently got to teach the MarkLogic Essentials class for MarkLogic University. To illustrate custom facets, I implemented one on the fly with the class watching. No pressure. :) The good news is that it (almost) worked with the first try — there was just one little problem with the display. This post shows the [...]
Today we’ll play “Spot That Mistake”. This will probably be really easy for some but it threw me off for a bit. My goal I wanted to bring some data into MarkLogic Server just to give me something to work with while exploring some features. I grabbed an XML file that represented the geocaches that [...]
A little while ago I ran YSlow, a Firefox plugin that evaluates how quickly a web page loads, against an Application Builder based app I’d written. YSlow gave my site a grade C, with an overall performance score of 71 (out of 100). Some of the suggestions that YSlow offered are not simple to implement [...]
Last week I got to do something a little different — I got to teach a class for MarkLogic University, the training group within the company. It’s been years since I last got to formally teach a class, but I really enjoyed it. No homework to grade, no tests to come up with, just time [...]
I learned something interesting today, so I thought I’d share. A colleague of mine wanted to figure out how to express a range of dates as a query string for an Application Builder app. These applications use the Search API, so a lot of the search magic is in the options that get passed into the [...]