Solr Services

This module provides a Services resource that enables
a remote application to search for Apache Solr indexed
content on your site using Drupal core's search and Apache
Solr API's features.

This Service provide the Solr details including Number of
results, Facets that enabled for this core and we can able
specify fields we want to show.

Requirements

  1. Services (https://www.drupal.org/project/services)
    (The 3.0 version is incompatible with Services 7.x-3.2 and later. Please use the -dev version and report your results here.)
  2. Search API Solr Search(https://www.drupal.org/project/search_api_solr)

Usage

Apache Solr configuration:
Install Apache Solr API's module by following handbook [1]. Index the required datas to Solr server.

Service Configuration
Create a Service for Solr search using services module by following handbook [2].

Specify endpoint with a path of your choice, e.g. services. Choose the REST server.
Edit the endpoint's resources and check search confirm that retrive is enabled.
Edit the server settings and choose a formatter you want.
Try the service's URLs in a browser:

  1. Retrieve all Details not considering search key word
    http://my.example.com/services/search/retrieve
    for content search.
  2. Retrieve data based on keyword
    http://my.example.com/services/search/retrieve?key=KEYWORD
    for content search with key word.
  3. Specifying fields we want
    http://my.example.com/services/search/retrieve?key=KEYWORD&fileds=FIELD1
    for content search with key word and single Field.

    http://my.example.com/services/search/retrieve?key=KEYWORD&fileds=FIELD1...,..
    for content search with key word and Multiple Field.
  4. Specifying page to show result.
    http://my.example.com/services/search/retrieve?key=KEYWORD&fileds=FIELD1...
    for content search with key word, single Field by specifying particular page.
  5. Enabling facets
    http://my.example.com/services/search/retrieve?key=KEYWORD&facets=1
    for content search with key word and Facet enabled.

[1] https://www.drupal.org/node/1999280
[2] https://www.drupal.org/node/109782

About the version numbers

  • 7.x-1.x: The branch for Drupal 7 with new features. The main supported branch. Compatible with Services 3.x
  • 6.x-1.x: Most used version for Drupal 6 sites Compatible with Services 2.x

This module was created as suggested http://drupal.org/node/459334

Supporting organizations: 

Project information

Releases