solr

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

Read more

Working with ApacheSolr and Search API

This page will describe how to install ApacheSolr and connect it to SearchAPI, using Views to deliver Solr content.

Installing ApacheSolr (OSX/Linux)

Installing & Configuring SearchAPI

Randomly Sorting Listings with Solr and Views

Some views may need to be randomly sorted, like when you're showing off a random listing in a sidebar of a theme. To do that, you will need the patches found here:

#1197538: Random sort in Views (patch)

Installing Solr on Ubuntu

Installing Apache Solr on ubuntu requires several dependancies. The easiest and quickest way to install Solr on ubuntu currently is done with the package manager: apt

Invoke the following command and you should be able to get apache solr installed on Ubuntu:

sudo apt-get install solr-tomcat

Make sure the java 6 is installed on your machine:
sudo apt-get install sun-java6-jre sun-java6-plugin

Optional Setup: Drupal Search api integration

Optionally you can get drupal setup with drupal search api integration.

Use the Solr apache integration schema.xml and solrconfig.xml files to get up and running quickly.

Using the search api solr module copy those files and place them in your solr conf folder:

mkdir ~/solrconfig;
cd ~/solrconfig
wget drupalcode.org/project/search_api_solr.git/blob_plain/HEAD:/solr-conf/1.4/solrconfig.xml
wget drupalcode.org/project/search_api_solr.git/blob_plain/HEAD:/solr-conf/1.4/schema.xml
sudo cp -v *.xml /etc/solr/conf

Restart the tomcat service

service tomcat restart

Read more

Step 4 of 10 Installing "Apache Solr Search Integration" Drupal module and "PHP library"

We are now going to install “Apache Solr Search Integration” Drupal module and "PHP library" on the second remote Ubuntu Server.

Read more
Subscribe with RSS Syndicate content