map

Zénobe Grammestraat 34,
2018 Antwerp, Belgium

Call us: +32 (0) 3 298 69 98
Email us: info@krimson.be

Contact us

Wednesday, 07 January 2009

Solr Custom Sort is a module that we made for the Air Miles Project. By default, Apache Solr doesn't allow you to add sort types. Basically, you can only use those that are standard set in advance. For the Air Miles project, this wasn't what we needed. Therefore, we're now working on the Custom Sort module, a module that allows us to add multiple sort criteria, with the ability to manage them all.

The challenge for us is now to get transparency. Today the module can only be managed by administers but in the future this should be possible for all users.
The solution was simple, we just had to overwrite the class that is implemented by Apache Solr.

  1. variable_set('apachesolr_query_class', array(
  2. 'solr_custom_sort',
  3. 'Solr_Custom_Query'
  4. ));

Written byStijn Vanden Brande

Obtained a Bachelor in ICT and headed straight for the Krimson office after that. This Junior Drupal Developer goes beyond websites: operating systems, networking and programming in general. He knows everything. And when there's something he doesn't know, you can be certain that -by tomorrow- he will. On his way to obtaining a Master's degree. (we'll keep you posted) Always out to get someone with a practical joke. With him you're never safe on the Krimson work floor. He's really the search button of the Krew.

Thanks for sharing!

Anything new on the Custom Sort module?

Somewhat related, there's also a Facet Builder module for Apache Solr out now.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <h4> <br>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options