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

Performance tuning

With AJAX Solr, we end up adding a lot of JavaScript and CSS to our pages. Though the searches would be faster as there is no server between the Solr server and the web browser, front-end optimizations can improve user experience. Here are some tips for that.

  • Controlling and minimizing server traffic: It is important to minimize the amount of data that flows between the Solr server and the web browser where AJAX Solr is in action. This can be achieved using the following:
    • Filtering at the server level: It is not a good idea to fetch the complete set of documents and the associated details from the server and filter them at the browser level so as to render only those results that match with the request. AJAX Solr performs filtering at the server level itself so that the transport channel doesn't get overcrowded with unwanted details. This also helps in minimizing the computation activities performed at the browser level.
    • Solr schema consideration: The Solr schema in AJAX Solr allows us to index the chunk of information that we intend to render on the browser. This helps us minimize unwanted data transport and allows the channel to transfer productive information.
    • Compressing JavaScript and CSS: Using AJAX Solr, we can compress JavaScript and CSS files. This reduces the data being transferred between the browser and the Solr server and hence speeds up the requests and responses.
  • Proxy server caching: AJAX Solr supports proxy servers. A proxy server can be set up to act as a reverse proxy cache, which can cache responses sent to the browser. Therefore, responses to repeated queries are faster, as the queries are not executed on the Solr server but served from the proxy server cache. Proxy servers can also be used to cache JavaScript and CSS files. With a proxy server, all responses can be compressed, which speeds up data transfer.
Назад: Working with AJAX Solr
Дальше: Summary

Solr
Testing
dosare
121