SearchBlox

SearchBlox Developer Hub

Welcome to the SearchBlox developer hub. Here you will find comprehensive guides and documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

CSV Collection

You can create an CSV collection by following the steps below.

  • After logging in to the Admin Console, click on the Add Collection button. The Add Collection screen will be displayed.
  • Enter a unique name for your collection (for example, CSV).
  • Click on the CSV collection radio button.
  • Click Add to create the collection.

Settings

The Settings sub-tab holds settings for CSV and tunable parameters for the search. CSV setting values must be set explicitly by the user for CSV collections. SearchBlox also comes pre-configured with parameters when a new collection is created.

Field
Descriptioin

Folder

The folder path where the CSV file is available.

Poll

Polling time for the collection to re-index.
Please give a numerical value, the value given will be in minutes.

Field Separator

CSV files are separated by a comma so “,” is given (default value).

Escape Character

Escape character is “;” (default value).

Quote Character

Quote value is single quote “’” (default value).

Use first record as header

If the first record in CSV file has to be taken as the header then check this box.

Unique Field

This unique field should have the name of the CSV column that has unique values in each row.
This value is very important for indexing and searching values from the CSV file indexed.

Keyword-in-Context Display

The keyword-in-context returns search results with the description displayed from content areas where the search term occurs.

Boosting

Boost search terms for the collection by setting a value greater than 1 (maximum value 9999).

Stemming

When stemming is enabled, inflected words are reduced to root form. For example, "running", "runs", and "ran" are the inflected form of "run".

Spelling Suggestions

When enabled, a spelling index is created at the end of the indexing process.

Note

Note: If the Unique Field values are not unique, the CSV collection results will not be consistent.

Indexing and Other Operations

The following operations can be performed in CSV collection.

Index

Starts the indexer for the selected collection.

Clear

Clears the current index for the selected collection.

  • Indexer activity is controlled from the Index sub-tab in the collection. The current status of an indexer for a particular collection is indicated.
  • In a CSV collection, indexing and clear operations can be performed only from the index sub-tab.
  • Scheduling cannot be performed in CSV, indexing is updated based on poll time.

Viewing Search Results for CSV Collections

Users can view the search results by searching for the records here: http://localhost:8080/searchblox/plugin/index.html.
After clicking the search results, the data will appear in grid format as shown below:

Customized facets can be added in the index.html page. The facet can be any value in the table that can be used to filter results.

The results can also be viewed in JSON format by clicking the CSV search results in a regular search: http://localhost:8080/searchblox/search.jsp. See below:

[
  {"keywords":" 10 11 20 0 0 1 0 61  8   SFN 1 2 0 0 5 5 32 0 1 NL 0 0 8 2004 0.41 6.75 aardsda01",
   "description":" 10 11 20 0 0 1 0 61  8   SFN 1 2 0 0 5 5 32 0 1 NL 0 0 8 2004 0.41 6.75 aardsda01",
   "created_at":"2015-09-14T05:04:03.345Z",
    "_autocomplete":" 10 11 20 0 0 1 0 61  8   SFN 1 2 0 0 5 5 32 0 1 NL 0 0 8 2004 0.41 6.75 aardsda01",
    "source":"        
            {\"BB\":\"10\",\"G\":\"11\",\"H\":\"20\",\"IBB\":\"0\",\"BK\":\"0\",\"HR\":\"1\",\"L\":\"0\",\"BFP\":\"61\",
            \"GIDP\":\"\",\"R\":\"8\",\"SF\":\"\",\"SH\":\"\",\"teamID\":\"SFN\",\"W\":\"1\",\"HBP\":\"2\",\"WP\":\"0\",
            \"SHO\":\"0\",\"SO\":\"5\",\"GF\":\"5\",\"IPouts\":\"32\",\"SV\":\"0\",\"stint\":\"1\",\"lgID\":\"NL\",\"CG\":\"0\",
            \"GS\":\"0\",\"ER\":\"8\",\"yearID\":\"2004\",\"BAOpp\":\"0.41\",\"ERA\":\"6.75\",\"playerID\":\"aardsda01\"}",
     "title":"1",
     "content":" 10 11 20 0 0 1 0 61  8   SFN 1 2 0 0 5 5 32 0 1 NL 0 0 8 2004 0.41 6.75 aardsda01",
     "contenttype":"csv",
     "uid":"1"
   }
]

CSV Collection


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.