Manage the display of search results

This documentation is written for the 7.x-2.x version of Display Suite.

Display Suite can override the way that Drupal's (and Apache solr's) default search results are being displayed. This will be useful if you wanted to include images or file attachments in search results.

WHAT/WHERE search + Solr 3.6 + location(lat/lng) + radius based search

This doc will help you to

  • Modify schema.xml so that it supports geo location values
  • WHAT/WHERE search (radius based) - instead of a single keyword based search
  • Content-type based filtration
  • Implementation of hook_apachesolr_index_document_build, hook_apachesolr_query_alter

I am not going through the steps for installing / connecting solr with drupal. A lot of articles are already available online.

Case

Typically for job/property search sites, where you have two text fields: WHAT and WHERE. I am using the apachesolr search pages for this implementation.
Example search:
WHAT: drupal architect
WHERE: Mumbai, Maharashtra, India
(basically, the 'where' is an autofill textbox - which gets data from YQL - and its cached when search is being repeated)

Schema.xml

Using Sarnia to interact with external Solr data

This document refers to the 1.1 release (in beta) of the Sarnia module. Sarnia allows a Drupal site to interact with and display external data from Solr, mainly by building views of data from Solr. This is useful for large external datasets that either aren't practical to store in Drupal or that are already indexed in Solr.

Sarnia is also the name of a town in Ontario, Canada, home of the largest photovoltaic power plant in Canada.

Table of contents

  1. Installation
  2. Generating a Solr core for testing
  3. Configuring Search API
  4. Creating Views of Solr data
  5. Advanced Solr
  6. Advanced Entities

Installation

Sarnia depends on Search API, Search API Solr, and Search API Views. The full list of dependencies includes:

Installing Apache Solr on Windows 2008 with Jetty Running as a Service

Please note that this article was reproduced with permission from Bill Beckelman's website. The original article can be found here. This guide has been used succesfully with Drupal.


Initial Solr Setup


1. Install the latest Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Make sure to select 64bit version if you need it.

Only local images are allowed. title="image" border="0" alt="image" src="/files/solr_windows_installation-1.png"
width="589" height="473">


 


2. Download Solr 1.4.1 from one of the mirrors at http://www.apache.org/dyn/closer.cgi/lucene/solr/
(at the time of writing, not all mirrors seem to be hosting 1.4.1, but most seem
to have at least 1.4.0)

Only local images are allowed. title="image" border="0" alt="image" src="/files/solr_windows_installation-2.png"
width="566" height="236">


3. Unzip the Solr download. You should have the files listed in the image
below. Open the example folder.

Only local images are allowed.

Pages

Subscribe with RSS Subscribe to RSS - Apache Solr