subject: Solr And Lucidworks Enterprise: When To Use Each [print this page] In today's world, building the perfect product is a lot like trying to repair a set of train tracks while the train is barreling down on you. The world just keeps moving, with great ideas and new possibilities tempting you every day. And to make things worse, innovation doesn't just show its face for you; it regularly visits your competitors as well.
That's why you use open source software in the first place. You have smart people; does it make sense to have them building search functionality when Apache Solr already provides it? Of course not. You'd rather rely on the solid functionality that's already been built by the community of Solr developers, and let your people spend their time building innovation into your own products. It's simply a more efficient use of resources.
But what if you need search-related functionality that's not available in straight Solr? In some cases, you may be able to fill those holes and lighten your load with LucidWorks Enterprise. Built on Solr, LucidWorks Enterprise starts by simplifying the day-to-day use tasks involved in using Solr, and then moves on to adding additional features that can help free up your development team for work on your own applications. But how do you know which path would be right for you?
The answers depend on a number of different factors, including the size and scope of the project, your available resources, and even the types of data involved, so let's look at some of the more common tasks involved in running a search-related application. This way, you can make up your own mind as to what's best for you. Let's start by getting the lay of the land.
roduct you're using, involving the following steps:
9.Define your indexed content
10.Define your data
11.Define user/data domains
12.Index your data
13.Build your application (including facets, autocomplete, etc.)
or
Issue queries through the built-in query interface
14.Keep your indexes updated
15.Control access
16.Monitor the system
Solr-based applications (including those built as an extension to LWE, rather than using the built-in query page) get their data by issuing an HTTP call and parsing the results. That has the advantage that they can be used in virtually any programming environment, using virtually any programming language, so that won't be a factor in your decision, but a single programmer looking to index a single source of documents will likely have different needs than a large corporation with heterogeneous data and multiple stakeholders with different data requirements.
At the most basic level, we have three different options to look at:
Straight Solr: In this case, you've got the engine and all of the flexibility that provides, but there's a lot you will need to do yourself. You may get more fine-grained control, but it comes at a price for ongoing maintenance, and might require higher-skilled resources to invest their attention in more mundane work.
LucidWorks Enterprise web-based user interface: The LWE UI provides easy ways to accomplish common tasks, but there are times you might need to go beyond that to the ReST API. A UI is not scriptable, but it's easy to point and click, particularly if some of your administrators are not comfortable with scripting.
LucidWorks Enterprise ReST API: All of the capabilities LucidWorks Enterprise offers are also available via ReST API. Simply put, the ReST API enables you to accomplish tasks programmatically using HTTP calls, with some scripting; the scripting, in turn, enables creation of repeatable processes and automation.
So let's look at some of the more common tasks you'll need to accomplish when building search into your applications, and what they mean in each of these three environments.
Installation
Before you do anything else, of course you're going to have to install the software.
Apache Solr is largely a roll-your-own system, a web application that you need to configure yourself. The actual installation is pretty simple -- just unzip the software. But while the standard distribution includes several example environments, they're not meant for production use, so you'll need to decide how you want your particular instance configured, and run it in a proper web application server.
LucidWorks Enterprise comes with both a GUI installer and a command-line installer, both of which can be run with the default inputs to create a production system.
SolrLWE GUILWE/ReST
5.Unzip the download
6.If necessary, install within a servlet-capable web server
7.Configure the Solr instance using solrconfig.xml
8.Start the application2.Run the installerIncluded in standard installation
Defining fields
The actual engine behind both Solr and LWE, which is built on Apache Lucene, includes the ability to create various document "fields", each of which can have their own requirements and can be treated differently when they're indexed or searched.
Adding new fields and field types to Solr involves editing the installation's schema.xml file. In this file, you can add new field types, and create fields that use those types.
LucidWorks Enterprise includes a web-based user interface that enables you to add additional fields and specify properties such as whether they should be used for spell-checking. LWE comes with the common field types already configured, but because LWE is built on Solr, if you do actually need to create a new field type, the option of editing the schema.xml file is still available to you.
The LucidWorks Enterprise ReST API includes the ability to add, edit, and delete fields programmatically, so if your requirements change, you can dynamically alter field definitions, for example to add a new field needed for additional data.
SolrLWE GUILWE/ReST
7.Determine appropriate filters and tokenizers
8.Define the field type
9.Add the type to the schema.xml file
10.Add the field to the schema.xml file, referencing the type
11.Validate schema.xml
12.Restart Solr4.Go to Index -> Fields
5.Add the field using the provided web form and specify the appropriate attributes
6.Save the definition2.Create the field with a POST request