Mike Grafton's blog



Mike GraftonMike Grafton
Standup - 1/31/2008
edit Posted by Mike Grafton on Thursday January 31, 2008 at 05:56PM

Help!

  • Has anybody successfully used the drag-and-drop functionality included in the newer versions of Selenium? It doesn't appear to work - the mouse events never seem to get fired.

Interesting

  • If you're messing with the solr.war inside of the solr_runner plugin, beware that the webapps directory (in which it sits) is scanned by Jetty for .war files, and that when your use 'rake solr_runner:start', you might not be running off the .war file you think you are. When we started SOLR this way, we saw some output from Jetty that indicated that it was unpacking and using the wrong .war file from that directory (in our case, it apparently used solr.war.new!).

    The moral of the story is, if you want to swap in a new version of solr.war, just move it on top of the existing one, and don't put any other files in there.

Mike GraftonMike Grafton
Standup - 1/30/2008
edit Posted by Mike Grafton on Wednesday January 30, 2008 at 05:21PM

Help!

  • Does anybody know anything about Lucene scoring using a document boost?

    We see an exponential relationship between document boost and the fieldNorm component of the score for each term. Can anybody explain this?

Mike GraftonMike Grafton
Standup 01/29/2008
edit Posted by Mike Grafton on Tuesday January 29, 2008 at 05:30PM

Help!

  • How do I turn off coloring in the RSpec runner?

    The answer: don't put

    --color
    in your spec/spec.opts file.

Interesting

  • There's an easy way to merge hashes in Javascript, using either JQuery or Prototype.

    For JQuery:

    $.extend(target, hash1, hash2, ...)

    For Prototype:

    Object.extend(target, hash)

    JQuery's syntax is a bit nicer since you can merge any number of hashes into the target hash.

    This is handy for grabbing JSON off the wire and merging it into an existing or "default" object.

    You can use this to merge prototypes, achieving a type of "inheritance" (or what passes for such in Javascript). But be careful, since the rightmost hash wins - IE, its properties overide properties by the same name in the target.