Книга: Apache Solr Search Patterns
Назад: Summary
Дальше: The AJAX Solr architecture

Chapter 8. AJAX Solr

In the previous chapter, we learnt how Solr can be used in an advertising system. We understood the working of an advertising system, its architecture, and the complexities involved in the implementation of the system. We also discussed some performance improvements in Solr with respect to the advertising system. In addition, we wrote a custom plugin for Solr intended for the integration of Solr with Redis (the key value memory store).

In this chapter, we will explore an advanced package known as AJAX Solr. We will first look at the architecture of AJAX Solr and then see how different functionalities of Solr such as pagination, search result faceting, customization of search results, and tag cloud can be performed using AJAX Solr. We will cover the following topics:

  • The purpose of AJAX Solr
  • The AJAX Solr architecture
  • Working with AJAX Solr
  • Performance tuning

AJAX is a JavaScript library that can be used to create interfaces in Apache Solr. It does not require any JavaScript framework to work, but needs an AJAX implementation to communicate with Solr. Therefore, it can be used in conjunction with JavaScript libraries and frameworks such as jQuery and Angular.js, which support AJAX. Earlier a JavaScript library called SolrJS was developed as a Solr JavaScript client. AJAX Solr is a fork of this library and has evolved as a JavaScript client for Solr.

The purpose of AJAX Solr

AJAX Solr is a Solr client developed using JavaScript. AJAX Solr facilitates interesting visualizations of a result set that includes widgets to display tag clouds of facets, filtering of results by date fields, and plotting of maps based on country code information. AJAX Solr can be integrated with any web application enabling the Solr-related operations to be performed directly on the Apache Solr interface, without the necessity to incorporate any language in between.

Ideally, any request on the Internet is received by a web application residing on the server, and Solr-related operations are forwarded to the Solr server for processing. This is shown in the following diagram. The request originating from the browser travels over the Internet to the web application residing on the web server. The web server then creates a Solr request and performs the required operation on the Solr server.

The purpose of AJAX Solr

With AJAX Solr, the intermediary web application can be removed from the picture, allowing the JavaScript application on the user's browser to communicate directly with Solr servers. This is shown in the following diagram. We can now add a visually appealing AJAX view of the search results without any impact on the web application.

The purpose of AJAX Solr

While working with AJAX Solr, operations to be performed in Solr, such as Solr queries, are processed on the web browser using JavaScript. This reduces processing on the web application and its complexity.

The primary features of AJAX Solr are as follows:

  • A dynamic and interactive GUI
  • A faster GUI
  • An enhanced hit highlighter
  • Modernized standards
  • Cost-effectiveness
  • A widget framework
Назад: Summary
Дальше: The AJAX Solr architecture

Solr
Testing
dosare
121