Apache Solr

How to control sorting for nodes with missing values in sort field in Apache Solr

Submitted by Anonymous on October 14, 2010 - 3:00am

The other day while hanging out in IRC, I was pinged by katbailey, the Lady of the Lovely Voice (I could listen to her talk for hours) with a question about sorting in Solr when a sort field doesn't contain a value.  In particular, how can you control whether nodes without a value in the sort field show up at the beginning or end of the search results?  In her particular case, there was a Price field that was being sorted on, but not all nodes had a Price value, and the ones without Price were showing up at the beginning of the list. Read more about How to control sorting for nodes with missing values in sort field in Apache Solr

Configuring Apache Solr Multi-core With Drupal and Tomcat on Ubuntu 9.10

Submitted by Anonymous on June 18, 2010 - 3:00am

One of the things I've had to do recently is set up a development server that has multiple sites with Apache Solr so that each site has its own index in Solr.  After searching the internets for information on how to do this, I found two sources that contained part of the process, but not put together in a way that worked for me. 

    Nick Veenhof's blog post on setting up Solr on Ubuntu 9.10
    The "Apache Solr Multi-core Setup" handbook page on drupal.org (adapted from a post by Chris Rikli) Read more about Configuring Apache Solr Multi-core With Drupal and Tomcat on Ubuntu 9.10

Creating Custom Path For Solr Search With Custom Filters

Submitted by Anonymous on June 13, 2010 - 3:00am

One of the most commonly used features in Drupal is path aliases; that is, the ability to define a custom, clean URL that accurately represents the content contained in that page.  A basic example is creating a mysite.com/about-us URL for an About Us page.  This can also be done in Apache Solr with search result pages.  It's a bit more work than setting up an alias with the Pathauto module, but the end result is a page of customized search results listed at a custom URL.  In this post, I'm going to take the URL of mysite.com/search/apachesolr_search/?filters=type%3Avisualization and create Read more about Creating Custom Path For Solr Search With Custom Filters

Adding Custom Fields to Apache Solr Search Results

Submitted by Anonymous on June 6, 2010 - 3:00am

As I mentioned in my previous post on adding a custom sort to Solr, this post is about something that is even simpler; adding a new field to the search results.  In our particular use case, we wanted to add a CCK image field to the results.  To add a slight twist, we needed to add a different image depending on the content type: the user picture for a profile node (created with content_profile module) or a CCK imagefield named field_main_image from the other content types. Read more about Adding Custom Fields to Apache Solr Search Results

Creating Custom Sorts In Apache Solr

Submitted by Anonymous on June 5, 2010 - 3:00am

I attended Drupalcon for the first time this year in San Francisco, and of all the sessions I attended, one that really stood out for me was Apache Solr Search Mastery, put on by Robert Douglass and Peter Wolanin of Acquia and James McKinney of Evolving Web.  It was like the first time I read "Pro Drupal Development", in that it really opened my eyes as to what is possible with the Solr module.  On top of that, I was almost immediately able to take what I learned back to a project I was working on and start using it. Read more about Creating Custom Sorts In Apache Solr