Please say hello to Lucene Sugar: a library that provides a more concise syntax for the Lucene API in the Scala language. Lucene Sugar makes it easier to:

  • compose Lucene indexes using the familiar Scala cake pattern
  • add indexed and/or stored fields to a Lucene document
  • index collections of documents
  • search! (You didn’t really expect that, did you?)

My general goal for Lucene Sugar is to turn some standard operations on their head. For example, instead of:

scala val doc = new Document doc.add(new StringField("string_field", "aString", Store.YES)) doc.add(new LongField("long_field", 123456L, Store.NO)) doc.add(new StoredField("int_field", 10))

you can now write:

scala val doc = new Document doc.addIndexedStoredField("string_field", "aString") doc.addIndexedOnlyField("long_field", 123456L) doc.addStoredOnlyField("int_field", 10)

Lucene Sugar is still in its infancy, but I believe it already offers great value to anyone wishing to use Lucene in Scala code.

Why I Created Sugar

Gilt’s inventory includes millions of different items in limited quantities. These items are sold quickly, which means that our inventory is constantly changing. A few weeks ago I found that I needed a data store capable of:

  • storing items composed of text and numbers
  • being indexed and filtered using extremely specific criteria (for example, all white shirts from Paul Smith that can be shipped to Canada)
  • working quickly and efficiently (a few 100ms per query)
  • being embeddable (I wanted the data management to be self-contained in the service without requiring any external dependencies

I’d used Lucene for other projects, and thought it might be a great fit for what I needed. In fact, it turned out that—despite its wordy API—Lucene works very well. To overcome the excess verbiage issue, I added some “Scala syntactic sugar” around the Lucene API to make it more concise and pleasant to use. After doing some coding, I realized that it could be helpful to convert this higher-level API into a library that could be reused in other projects. (I also badly wanted to publish my first open source Scala project, so this was a very good candidate.)

With Lucene Sugar, we can now build a search and browser service on top of our inventory data; the data is composed of textual attributes such as product name, brand, color and description as well as numeric data like price and size. I hope you find it useful as well!

Photo by Uwe Hermann. Creative Commons license.

The jQuery Foundation just posted video of “If You Love It So Much, Why Don’t You Write a Wrapper Around It?”—my presentation at last month’s jQuery Conference in Portland, Ore. In my talk, I focus on the importance of using consistent APIs and taking advantage of other people’s work (in the form of third-party code) when working with a large code base. Putting a wrapper around someone else’s code can give you the API and feature set you want, while saving you tons of tedious work writing business logic.

The last time I attended jQCon was in 2010, when it was held in Boston. The conference is sponsored by jQuery, and certainly features a fair amount of jQuery-related content, but one of the things I appreciate most about it is its focus on larger-scale, front-end issues of the day. This year was no exception.

Back in 2010, two major themes that emerged during jQCon were pubsub messaging and client-side templating. At that time, Gilt was somewhat behind the curve in these areas. Our front-end team came back from the conference feeling inspired and energized, and built systems to handle both pubsub messaging and client-side templating. One was Gilt.Notify, an adaptation of Peter Higgins’ pubsub plugin. The other system was Gilt.Template, which at the time was a template-engine-agnostic wrapper around client-side templating (since different teams were using different template engines). Both of these systems have evolved over time, as we’ve normalized to one template engine (Handlebars) and added private pubsub channels that function like observers, but both are still part of our new module-based front-end stack.

In 2013, we find ourselves right in line with the current state of the industry. Featured talks covered HTML5 polyfills, CSS3 animations, front-end unit testing, client-side MVC, promises, A/B testing, client-side build tools, and—as the topic of my presentation illustrates—wrapping third-party plugins and libraries. Gilt has been working on all the above over the past couple years, and it was good to know that we’re up-to-date with the latest in front-end technology.

Check out the slides here. If your window is large enough, you’ll see at the bottom the notes I wrote to accompany the slides.

It’s with great pleasure that we’re announcing the awesome Gilt API lessons on Codecademy!

Be ready to take your JavaScript skills to the next level and learn how to find the latest and most beautiful fashion products with the Gilt API.

Begin to learn our APIs now!

Join Gilt Groupe for the Hearst Fashion Hack, the largest fashion hackathon of the year, where you could win $10,000+ to launch your fashion app!

The Hearst Fashion Hack (#HearstFashionHack) kicks off on Saturday, February 9 at 9:00 a.m. with welcoming introductions by Hearst followed by developers pitching their ideas and forming teams. Coding begins promptly at 1:00 p.m. and submissions are due exactly 24 hours later. On Sunday, prototypes will be presented to the judges. Special consideration will be given to apps that inventively connect readers and editors in real-time.

Tickets are limited. We welcome enthusiasts from all levels of fashion expertise, from corporate juggernauts to prominent young students. We look forward to having you at the Hearst Fashion Hack and helping you build your fashion dreams.

The Gilt Public API is a great tool for developing new ways for people to shop quickly, efficiently, or on new platforms. But developers using the API are also finding unexpected things to do with Gilt data— they’re using it to make games.

So in the spirit of Friday, why not spend a few minutes playing with a couple of games that have been built on top of the Public API?

Gilt Memory was built by Karl Norling, a developer here at Gilt. See how quickly you can find the matching pairs of products, then challenge your friends to beat your score!

The Price is Right on Gilt was built overnight at the NYC Powered by MongoDB Hackathon last weekend. This live multiplayer game lets you and up to 3 other friends play a price-guessing game to see who knows Gilt’s products the best. Developer Yufei Liu built the project using Node.js and MongoDB.

Happy Friday, everyone!

What’s better than spending 24 hours in Manhattan hacking on sweet projects using MongoDB and the Gilt API? Doing it while supporting HackNY, a New York City organization that promotes innovation and entrepreneurship among the city’s up-and-coming students and hackers. And that’s exactly what you can do next weekend, April 27-28, at 10gen’s MongoDB Hackathon. A lot of great people, and great companies, are going to be there, and we’re excited to see you come down and make the next cool project. On Saturday night an esteemed panel of judges will choose winning projects and award all manner of prizes, including iPads, Xbox 360s, and more.

We’ll be at the event to share how to get started with the Public API and answer any questions you may have, give you ideas on what you could build, and maybe give you a sneak peek into what we’re working on for the future of the API, so come find us!

For questions about the event, you can send a tweet to @MongoDB. For questions about the API, get in touch @GiltTech or send an email to!

There’s been even more work done getting the Gilt API wrapped up in language bindings over the past two weeks and I’m here to present the newest to you in case any of them tickle your fancy.

gilt_api_php is a PHP client written by Gilt Tech member Dan Revel. This library has tests and a demo app to get you started on downloading and featuring sales and products in no time.

Gilt-Java, by Gilt Tech’s very own Nitin Dhar, is of course a Java library for the Public API. Nitin is working on some Android compatibility so mobile app developers don’t need to remain glued to our iOS bindings!

gilt-python is a brand new Python library brewed here at Gilt by engineer Andrew Ellerton. If you’re working in Python, give it a try and see how you like it!

We’re hard at work on compiling a permanent directory of client libraries like the ones we’ve featured on this blog and some of the applications people have built already. Email us soon if you have something you want to see included!

It’s been great to hear from developers over the past two weeks about their plans for the Gilt Public API, and we can only imagine what’s in the works out there that we haven’t heard about yet! Meanwhile, back at Gilt HQ, we’re hard at work on adding more to the API— more data and more ways of accessing what you want in the easiest way possible.

In the meantime, though, I’m happy to announce that we’ve finally got everything in place to enable you to participate in the affiliate marketing program. By enrolling in this program and adding a single parameter to all the requests you pass in, you can earn a competitive 6% commission on all sales from referred customers. When you consider that the luxury items on Gilt lead to average total order values of $150, that adds up pretty quickly.

All the information you need to get started has been added to the Gilt Developer Portal; the technical information is on the main documentation page and information about how to sign up for the affiliate program is available on our FAQ. What are you waiting for?

7 days ago, we launched our Public API and the accompanying Developer Portal. We’ve received a lot of great feedback, updated the Portal a bit to better give you the information you need, and talked to a lot of developers with some really neat ideas for ways to use the API. Now’s a great time to get started on your own application!

Today I’m here to share some of the hard work that people have been doing, both here at Gilt and in the developer community at large, to make the API more accessible to developers of specific languages. We now have the first API language bindings available for Javascript, Ruby, Objective-C, Scala, and Python!

There’s more to come; I’ll make sure to update here when we have support for more languages or other libraries that might tickle your fancy. Until then, this should be enough to get you started, right?


Developed by Chris Young-Zawada here at Gilt, these Javascript language bindings are available as a jQuery-based implementation, so all you have to do is drop in a recent version of jQuery and this .js file and you’re off to the races!


gem install kin is all you need to get started with using the Gilt API in Ruby. Developer Vivek Bhagwat put together this rubygem to let Ruby developers worldwide have access to Gilt’s great flash sales in their applications. Thanks, Vivek!


iOS development is kind of a big deal right now, and what better way to dip your toes in the water or extend the reach of your mobile app empire than to use this Gilt API iOS client library to integrate Gilt sales data into an app for iPhone, iPod Touch and/or iPad? (That’s a rhetorical question. This is the ultimate way to do those things.) The SDK was put together by a crack team of Gilt mobile developers: Louis Vera and Adam Kaplan.


Recently among my friends and, it seems, in the developer community at large, what started as a whisper (“Scala is pretty sweet”) has turned into a roar (“DEPLOY ALL THE SCALA”). If you’re one of the converts, I’m happy to tell you that developers Moses Nakamura and Vivek Bhagwat have prepared a fully-tested, simple to use library called Aurum that give you access to the Gilt API. Moses and Vivek win the prize for being the first client library developed outside of Gilt— it was up and ready for use fewer than 48 hours after the launch of the API!


Not content to rest after that, Moses put together a simple Python wrapper for the Gilt API as well. It’s currently the slimmest of the client libraries highlighted here today, clocking in at just over 100 lines of code, but supports digging through all of the sales and product information that you need to explore our curated sales and do all kinds of fun stuff with them. Good luck, Pythonistas!