Improved Search with Apache Solr!

Here's an announcement everyone who uses this site can appreciate... we now have a vastly improved search system courtesy of Mike O'Connor who took the time during and after Ubercamp to install and configure Apache Solr. This provides much faster searching and a few very handy blocks that let you sort and filter your search results!

  • Sort results based on node title, author, and date.
  • Filter results by forum so you can search specifically the support forum if you're trying to find the answer to a question.
  • Filter results by contribution type or category if you're trying to find a module for a specific purpose.
  • Filter by author to find a year-old post that you're pretty sure torgosPizza made but you can't remember when... Eye-wink
  • Filter by content type to search just forum posts, issues, contributions, etc.

So, fast faceted searching and no more duplicate results... Woohoo! Laughing out loud

A big thank you to Mike O'Connor for the hours he spent getting this all together and of course to Robert Douglass for making it all possible through his contributions.

Mike blogged about the setup if you're interested to know more. He's also cooking up an integration of Ubercart with Solr that would bring these rockin' faceted search features to a store catalog near you. (Anyone up for an open source NewEgg?) Keep an eye on that project. Cool

himagarwal's picture
Offline
Joined: 06/24/2008
Juice: 302
Re: Improved Search with Apache Solr!

I'm still looking for search where an image is generated (if available) besides title and description. Can be very handy for large websites.

mikejoconnor's picture
Offline
Joined: 08/07/2007
Juice: 536
Theming Search

himagarwai,

You can just change your search result theme to include an image. Check out the Customized search results page on drupal.org, it should be pretty simple. One benifit of Solr is it can cache your search result teaser, so drupal doesn't have to build the teaser for each result.

himagarwal's picture
Offline
Joined: 06/24/2008
Juice: 302
.

mikejoconnor,

Thank you for the link and great contribution to the ubercart team.

I have a bit doubt on how to proceed for the best result.

1. Can apachesolr + faceted_search + CCK facets + apachesolr_ubercart be integrated all at once?

2. As I came to know from customized search results that it can only be integrated in the core search.module and since I want to try apachesolr_ubercart, which sounds pretty koooooooooool, how should I proceed?

3. It would be AWESOME if thumbnail image, tile and teasar gets added to apachesolr_ubercart.

echosoft's picture
Offline
Joined: 06/19/2008
Juice: 12
Need java runtime?

I want to know if it need jdk/jre on server?

---- youjiakezhan.com & boocle.com ----

---- youjiakezhan.com & boocle.com ----

mikejoconnor's picture
Offline
Joined: 08/07/2007
Juice: 536
Java Requirments

I believe I am using JDK.

incaic's picture
Offline
Joined: 10/13/2007
Juice: 116
Anyone know of an ubercart

Anyone know of an ubercart site that uses apachesolr?

Would like to know if it is possible to have attributes and options as facets?
Can't seem to find any documentation or examples on attributes and options being
facets. Since they are simply CCK fields, I assume it is possible, but would like
to see it in action.

amdweb82's picture
Offline
Joined: 01/06/2009
Juice: 6
I'd second that, would be great to see some Ubercart+Solr demos

Anyone know of any really good demos combining Ubercart and Solr?

There is a module at http://drupal.org/project/apachesolr_ubercart but there's no demo links

divinevette's picture
Offline
Joined: 01/30/2009
Juice: 11
I third that.. has anyone

I third that..

has anyone been able to search by attributes?

j0rd's picture
Offline
Getting busy with the Ubercode.
Joined: 07/16/2008
Juice: 453
Re: Improved Search with Apache Solr!

I'm really looking forward to seeing apache solr + ubercart 2.x + a bunch of catalog facets come out. That'll be a huge improvement to the feature set of the catalog.

I say this, because i'm having to code some filter + sort code right now and it's painful.

Problem is, all my cheap clients on Shared Hosting are going to have to pay for more expensive hosting should they want these features, just to get solr to work....but I guess that's the trade off.

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1100
Re: Improved Search with Apache Solr!

I just got Solr installed and running on my UC2.4 site. I did a great job theming my core search and all my product images came up and it looked great. But now with Solr my search results are back to the stone age lol so it's time to do some more work Smiling

I am going to look into the 'Customize the search results page' link (does this apply to Solr or only core search?) and see about getting images to come up.

I also found this module/project: http://drupal.org/project/apachesolr_uc_images. It promises, "This module will allow you to have your images indexed and available for theming" but it appears to be dead. Does anyone know what is up with this?

Thanks
Mike

j0rd's picture
Offline
Getting busy with the Ubercode.
Joined: 07/16/2008
Juice: 453
Re: Improved Search with Apache Solr!

I believe the best way to go about this is to use a "view" for the search results. That way you can theme easily using "views" which I assume you already know.

Make for a very simple and elegant catalog.

DomP's picture
Offline
Joined: 02/16/2011
Juice: 42
Hi Mike, Did you get it to

Hi Mike,

Did you get it to work with the images? I have solr installed at Ducati Parts Online and would like to have the images in my search results too.. I know it's a pain with acquia prosper but who knows Smiling

incaic's picture
Offline
Joined: 10/13/2007
Juice: 116
Re: Hi Mike, Did you get it to

I took @j0rd's suggestion and created views of the info I wanted with the node id as the input argument and then created the following in template.php:

<?php
acquia_prosper_preprocess_search_result
(&$vars) {
 
$n = $vars['result']['node'];
 
$vars['search_image'] = views_embed_view('search_image', 'default', $n->nid);
}
?>

'search_image' is my view name as well as the name of the variable used in search-result.tpl.php

I build out all my views then place them where I want in search-result.tpl.php