SoftSlate Commerce
Home » Documentation » HTML Documentation

Advanced Search With Lucene

With 2.2.5, SoftSlate Commerce supports a more advanced method of searches against your product catalog by your customers. Lucene is an open-source technology from the Apache Software Foundation. By default, the search form customers use hits the database directly with an SQL query to pull in the products that match the search string. While that is suitable for many small sites, using Lucene provides a more sophisticated search that pulls in more relevant results. Plus, with Advanced Search you can sort the search results by relevance and price.

To set up Advanced Search with Lucene in SoftSlate Commerce, simply follow these steps:

  1. The first step is to create a search index for Lucene to use. The search index takes all the product information in the database and places it in special files Lucene uses to look up the search results. To create the index, in the Administrator navigate to Product Catalog -> Advanced Search -> Advanced Search Reindex and click the "Rebuild Index" button.

    [Important]Important

    The search index captures your product information only at the time you click the "Rebuild Index" button. If you subsequently add or update products, you must rebuild the index again to have the new information appear in search results.

    By default, SoftSlate Commerce places the index files inside the /WEB-INF/lucene directory. You can nominate a different location however, by adjusting the "Lucene Index Directory" setting.

  2. Next, in the Administrator, navigate to the global Advanced Search settings screen at Product Catalog -> Advanced Search -> Advanced Search Settings. Here you can define which areas of the application will use the Advanced Search. In particular, you can use Lucene for searches customers enter into the search box, for the display of category pages (allowing for sorting products by price), and other areas. Turn on the areas you which to use Advanced Search for.

  3. That's it. Your store now has the Advanced Search feature enabled. Take it for a test drive, and don't forget to rebuild the index whenever you add or update product information.

Copyright © 2009-2017 SoftSlate, LLC. All Rights Reserved.

Powered by SoftSlate Commerce

Foraker Design