Setting up Drupal Search using SearchBlox


SearchBlox’s Drupal module is the easiest means of facilitating communication between a Drupal install and a SearchBlox server. Once the module is installed and configured, SearchBlox is not only able to index an entire Drupal site, but also to include content from numerous collections – Twitter, Google Drive, even third party sites – in search results. All without writing a line of code.

How to Integrate A Drupal Site With SearchBlox

Task 1 – Add an Empty Collection For Your Drupal Site

Task 2 – Install and Sync Drupal Module
Configure Drupal Module
Specify Collection
Synchronize with SearchBlox

Task 3 – Add SearchBlox to the Drupal Front End

How to Add External Collections to SearchBlox for Drupal

How to Add an Amazon S3 Bucket to SearchBlox for Drupal

How to Add A Website to SearchBlox for Drupal

How to Add a File System to SearchBlox for Drupal



 

Setup Instructions

Task 1 – Add An Empty Collection For Your Drupal Site

The first step in integrating Drupal and SearchBlox takes place on the SearchBlox server, where you’ll setup the collection for your Drupal install.

You can log into SearchBlox via the web interface, and adding a collection takes three clicks.

Add Collection Button, SearchBlox AdminFirst, on the SearchBlox admin home screen, click the “Add Collection” button. The button is located near the top of the screen, just below navigation.

Creating your Drupal Collection involves first naming it. SearchBlox collections are case sensitive, and do not allow for spaces and certain punctuation marks. However, SearchBlox collection namespaces are limited to the SearchBlox install. Unlike Amazon S3 buckets, multiple SearchBlox servers can use the same Collection Name without any repercussions.

Because the SearchBlox Drupal module takes advantage SearchBlox’s API, you will need to select “Custom Collection” as the Collection Type.

 

add-collection-2

After that, click the “Add” button and an empty collection will be added to your SearchBlox server.

 

Empty Drupal Collection on SearchBlox

 

Back to top

 

 

Task 2 – Install And Sync Drupal Module

Prior to installing the SearchBlox Drupal module, you will want to have four pieces of information regarding your SearchBlox Server:

  1. SearchBlox API Key
  2. Server Address
  3. Server Port
  4. Collection Name

Both the API Key and Server address can be found in the Admin section of your SearchBlox server.

 

SearchBlox Admin Section - where to find your API Key

 

The port number will be dictated by your server setup. The Collection name is the name chosen during Task 1 – Add An Empty Collection For Your Drupal Site.

Just like any other Drupal module, upload the SearchBlox Drupal module to your Drupal Install’s module directory. Then, enable the module in the Modules section of your Drupal site.

 

How to enable SearchBlox Drupal Module

 

Next, you will need to carry out the SearchBlox Drupal Module 3-step configuration process.

 

 

Step 1 – Configure Module

 

How to setup the SearchBlox for Drupal module

 

Enter API Key, Server Name, and Port Number of your SearchBlox server. If SearchBlox and Drupal are installed on the same server, use the server’s external IP address.

After clicking the “Save Configuration” button, the Drupal Module will attempt to contact the SearchBlox server. If an error is encountered, the Drupal Module will provide information on where the error was encountered. Else, the Module will proceed to Step 2.

 

 

Step 2 – Specify Collection

 

How to specify your drupal collection for SearchBlox

 

Enter the name of the Collection you created in Task 1 here. Upon clicking the “Save Configuration” button, the module will contact your SearchBlox server and attempt to locate the Collection. If the specified Collection is not found, an error message will be displayed. Else, the module will proceed to Step 3.

 

 

Step 3 – Synchronize with SearchBlox

 

how to sync your drupal site with searchblox

 

 

The final step is to click the “Synchronize with SearchBlox” button. This will instruct the SearchBlox server as to the format and contents of your Drupal install as well as index the content.

After you see this screen, your Drupal install is indexed. This Collection is now accessible via SearchBlox.

 

 

successfully synced Drupal site with Searchblox

Back to top

 

 

Task 3 – Add SearchBlox to the Drupal Front End

After SearchBlox and Drupal are synchronized, you will need to enable SearchBlox within Drupal.

The first step towards switching from Drupal’s default search to SearchBlox involves modifying which search module the Drupal install relies on. This is done by going to Configuring >> Search Settings via the Drupal admin menu.

Here you can choose what Search Modules are active as well as specify SearchBlox as the default search module for this Drupal Install.

 

How to configure the SearchBlox for Drupal as default search

 

After you have made these changes, click the “Save Configuration” button at the bottom of the panel.

After you have set SearchBlox as the default search module, you can select what Collections you wish to include in both searches and results.

By default, the SearchBlox Drupal Module includes all Collections on a SearchBlox server in a search. This allows for various sources – such as Amazon S3 buckets, RSS, and even remote file systems – to be searched from a Drupal install.

To limit the Collections included in your Search, on your Drupal install go to Configuration >> SearchBlox Search Collections.

This screen will display all of the Collections that can be included. To limit collections, simply check the box for those that you wish to include.

 

 

How to specify SearchBlox Collections to include in Drupal results

 

 

After you have selected the Collections you wish included in your Drupal search functions, click the “Save Configuration” button.

The final step of this task is to configure the blocks where SearchBlox is going to function on the Drupal site. You can find this setting through Structure >> Blocks.

 

 

How to specify Drupal Blocks for SearchBlox

 

After you have installed and configured SearchBlox for Drupal within a Drupal block, you can start using the service.

What does SearchBlox for Drupal look like?

Unlike the default Drupal Search module, SearchBlox provides users with metadata about the search. This information – including items like Content Type, age, and Collection – allows users to put search results in context.

Like other Drupal blocks, you have control over where the SearchBlox block displays and how it appears.

Back to top

 

 

 

How To Integrate External Collections in SearchBlox for Drupal

SearchBlox Free Edition allows for indexing a single collection. By purchasing the Server Edition, users can add a number of collections limited only by server hardware. Once these Collections are created, they are easily accessible through Drupal and results are served right next to Drupal content.

Collection types include:

  • Google Drive
  • Amazon S3
  • CSVs
  • Twitter
  • Websites (HTTP)
  • RSS Feeds
  • MongoDB
  • Other Databases
  • File Systems
  • Custom Applications (via the SearchBlox API)

How To Install a SearchBlox License

In order to upgrade from SearchBlox Free Edition to SearchBlox Server Edition, you need to purchase a license. This license can be applied directly to your SearchBlox Free Edition and does not require downloading a new application or a change to your API Key. You can start the process of purchasing a license here.

After you have downloaded a license, upload the license to your your SearchBlox Server. In the Admin section of the SearchBlox control panel, there is a field marked “New License.”

how to upload a SearchBlox Product Key

Click the “Browse…” button to locate the copy of your license. After you have found the license, click the “Upload” button. SearchBlox will verify the key and then unlock or update Server Edition.

Back to top

 

 

 

How to Add an Amazon S3 Bucket to SearchBlox for Drupal

To add an Amazon S3 Bucket to your Searchblox for Drupal, you will first need to set up the Amazon S3 collection. If you do not already have an Amazon S3 account, you can sign up for a free account here. Integrating with Amazon S3 is a fantastic way to easily and economically increase the number and variety of documents you include in your SearchBlox collections.

Step 1 – Add New Collection

On the SearchBlox Server main page, click the “Add Collection” button. As with other Collections, the first step is to name your Collection and pick the Collection Type. As expected, the collection type is “Amazon S3 Collection.”

how to create a SearchBlox collection for Amazon S3

Click the “Add” button to return to the SearchBlox Server main page.

 

Step 2 – Configure Collection

From the SearchBlox Server main page, click the name of your Amazon S3 Collection to go to the Configuration Screen. Here you will be asked to fill out several fields. You will need to provide the Access Key, Secret Key, and Bucket name from your Amazon S3 account.

How to setup an Amazon S3 bucket in SearchBlox

After you have added this information, click the “Save Changes” button and return to the SearchBlox main page.

 

Step 3 – Index Your Amazon S3 Collection

After your Amazon S3 bucket has been added to SearchBlox Server, you will want to manually start an index. You can do this right from the Main page by locating the Amazon S3 Collection in your Collections list and clicking the “Index” button.

Indexed Amazon S3 Bucket in SearchBlox

 

 

Step 4 – Add Amazon S3 Collection to SearchBlox for Drupal Module

Once SearchBlox Server has indexed your Amazon S3 bucket, the Collection should be immediately available to your SearchBlox for Drupal websites.

To verify that these collections are being included in your Drupal search functions – log into your Drupal site and go to Configuration >> SearchBlox Search Collections. There you will see a list of all Collections that the SearchBlox for Drupal Module has access to.

If no Collections are checked, then the SearchBlox for Drupal Module includes all collections in search functions. If one or more Collections are checked, then you will need to check the box next to the recently added Amazon S3 Collection. After making changes, click the “Save configuration” button.

add-collection

After a few moments, this Collection will be included in Drupal search functions.
Back to top
 
 

How To Add A Website to Search Blox for Drupal

To add a Website to your Searchblox for Drupal, you will first need to set up the Website as a Collection.

 

Step 1 – Add New Collection

On the SearchBlox Server main page, click the “Add Collection” button. As with other Collections, the first step is to name your Collection and pick the Collection Type. As expected, the collection type is “HTTP Collection”

How to add a website as a SearchBlox Collection

Click the “Add” button to return to the SearchBlox Server main page.

 

Step 2 – Configure Collection

From the SearchBlox Server main page, click the Configure Collection button to go to the Configuration Screen. Here you will be asked to fill out several fields. You can specify root URLs you wish to crawl, paths you wish to allow (and disallow) and file formats that you want to include or exclude from results.

How to configure a searchblox website collection

After you have added this information, click the “Save Changes” button and return to the SearchBlox main page.

 

Step 3 – Index Your Website Collection

After your Website Collection has been added to SearchBlox Server, you will want to manually start an index. You can do this right from the Main page by locating the Website Collection in your Collections list and clicking the “Index” button.

 

Indexing a website with SearchBlox

 

 

Step 4 – Add Website Collection to SearchBlox for Drupal Module

Once SearchBlox Server has indexed your website, the Collection should be immediately available to your SearchBlox for Drupal websites.

To verify that these collections are being included in your Drupal search functions – log into your Drupal site and go to Configuration >> SearchBlox Search Collections. There you will see a list of all Collections that the SearchBlox for Drupal Module has access to.

If no Collections are checked, then the SearchBlox for Drupal Module includes all collections in search functions. If one or more Collections are checked, then you will need to check the box next to the recently added Website Collection.

 

all-collections

 

After making changes, click the “Save configuration” button.

After a few moments, this Collection will be included in Drupal search functions.

Back to top
 

 

How To Add A File System to Search Blox for Drupal

To add a File System to your Searchblox for Drupal, you will first need to set up the Website as a Collection.

 

Step 1 – Add New Collection

On the SearchBlox Server main page, click the “Add Collection” button. As with other Collections, the first step is to name your Collection and pick the Collection Type. As expected, the collection type is “Filesystem”

fs-add-collection

Click the “Add” button to return to the SearchBlox Server main page.

 

Step 2 – Configure Collection

From the SearchBlox Server main page, click the Configure Collection button to go to the Configuration Screen. Here you will be asked to fill out several fields. You can specify paths you wish to crawl, paths you wish to allow (and disallow) and file formats that you want to include or exclude from results.

 

How to configure a File System collection in SearchBlox

 

After you have added this information, click the “Save Changes” button and return to the SearchBlox main page.

 

 

Step 3 – Index Your Filesystem Collection

After your Filesystem Collection has been added to SearchBlox Server, you will want to manually start an index. You can do this right from the Main page by locating the Filesystem Collection in your Collections list and clicking the “Index” button.

fs-index

 

 

 

Step 4 – Add Filesystem Collection to SearchBlox for Drupal Module

Once SearchBlox Server has indexed your file system, the Collection should be immediately available to your SearchBlox for Drupal websites.

To verify that these collections are being included in your Drupal search functions – log into your Drupal site and go to Configuration >> SearchBlox Search Collections. There you will see a list of all Collections that the SearchBlox for Drupal Module has access to.

If no Collections are checked, then the SearchBlox for Drupal Module includes all collections in search functions. If one or more Collections are checked, then you will need to check the box next to the recently added Filesystem Collection.

After making changes, click the “Save configuration” button.

After a few moments, this Collection will be included in Drupal search functions.

Back to top

Back to Top