E-mail Search

Email Search is one of the faceted search interfaces available from SearchBlox 9.1. This search can be used for searching e-mail archives indexed with an Email Collection.

To access email plugin please use the following link in your build.
https://localhost:8443/searchblox/email/index.html

Prerequisite

Please create an Email collection and index PST documents.

1161

Features of Email Plugin

  • You can search all emails directly by providing the terms.
  • You can perform a faceted search based on the values in the From, To, Subject and Date ranges.
  • The input fields are combined with AND. Multiple values within the same field are searched with OR.
1008

Steps to use Email Plugin

1021

Fields in facets.js

The content of facet.js are as shown:

window.facets = {
    "facets": [{
            "field": "colname",
            "display": "Collection Name",
            "size": "10"
        },
        {
            "field": "contenttype",
            "display": "File Type",
            "size": "10"
        },
        {
            "field": "keywords",
            "display": "keywords",
            "size": "10"
        },
        {
            "field": "lastmodified",
            "display": "Last Modified",
            "dateRange": [{
                    "name": "Last 24 hours",
                    "calendar": "days",
                    "value": "1"
                },
                {
                    "name": "Past Week",
                    "calendar": "days",
                    "value": "7"
                },
                {
                    "name": "Past Month",
                    "calendar": "months",
                    "value": "1"
                },
                {
                    "name": "Past Year",
                    "calendar": "years",
                    "value": "1"
                }
            ]
        }
    ],
    "collection": [],
    "sortBtns": [{
            "field": "lastmodified",
            "display": "Sort by date"
        },
        {
            "field": "relevance",
            "display": "Sort by relevance"
        }
    ],
    "facetFiltersOrder": [
      "colname","keywords"
    ],
    "facetFiltersType": "AND",
    "sortDir": "desc",
    "matchAny": "off",
    "pageSize": "10",
    "showAutoSuggest": "true",
    "defaultCname": "",
    "adsDisplay": "true",
    "featuredResultsCount": "3",
    "predictSearch": "false",
    "predictResultSize": "3",
    "customDateDisplayText":"Custom",
    "customDateEnable":"true",
    "relatedQuery": true,
    "relatedQueryFields": {
        "apikey": "",
        "field": "content",
        "operator": "and",
        "limit": "5",
        "terms": "10",
        "type": "phrase",
        "col": ""
    },
    "dataToBeDisplayed": {
        "1": {
            "title": "Title",
            "description": "Description"
        },
        "other": {
            "description": "Description"
        },
        "displayAll": true
    },
    "tune": {
        "enable": "true",
        "tune.0": "5",
        "tune.1": "3",
        "tune.2": "2",
        "tune.3": "5",
        "tune.4": "180",
        "tune.5": "10"
    },
    "defaultType": "",
    "pluginDomain": ""
};
  • If you need to a meta field as facet, then the field has to be mapped in mapping.json. For CSV, database, MongoDB and AWS collections, the values need to be mapped in csv.json, jdbc.json, mongodb.json, amazonS3.json respectively here: ../webapps/searchblox/WEB-INF/.
  • If you need to add a facet field for type number or date, the field needs to be updated in ../webapps/searchblox/WEB-INF/mapping.json for web and file collections. For CSV, database, MongoDB and AWS collections, the values need to be mapped in csv.json, jdbc.json, mongodb.json, amazonS3.json respectively here: ../webapps/searchblox/WEB-INF/.
    ref: Custom Fields in Search

The description of the fields in the preceding js file is provided in the following table:

FieldDescription
facetsfacet fields have been disabled in tabbed search. Making changes to the same will not affect any changes in the plugin
collectionUsing this field you can specify/limit the collections to be used for this plugin. You can specifiy one or more collections in this field. The collection numbers must be specified as digits, if more than one collection they have to be separated by comma.
SortBtnsSort By field has to be provided here.
facetFiltersOrderOrder of facet filters to be displayed in plugin has to be specified here
sortDirThe direction of sort whether ascending or descending has to be specified here
pageSizeUsing this parameter the number of results per page can be controlled in faceted search
showAutoSuggestAutosuggest can be enabled or disabled using this parameter
defaultCnameThis is to specify default collection in which the search has to be made in the beginning
adsDisplayFeatured results can be enabled or disabled in search results using this
featuredResultsCountThe number of featured results to be displayed in the results can be specified here
predictSearchPredicted results can be enabled using this field
predictResultSizeParameters for predicted search can be specified here
customDateDisplayTextThis is for custom date label change in facet filters
customDateEnableThis is to enable or disable custom date
relatedQueryEnable or disable related query by giving true or false value for this field. By default it would be true
relatedQueryFieldsIf you want related queries in search results then specify the API key within the field. Also you can limit it based on collection by giving specific column number.
"apikey": "BFC82BE93A351C018CB27C32E1138047",
"field": "content",
"operator": "and",
"limit": "5",
"terms": "10",
"type": "phrase",
"col": ""
dataToBeDisplayedThis is specific for collections like csv and database where results have to appear in tabular format. The fields can be specified here.
If "displayAll" is true within this field all the data would be fetched from the results
tuneTune parameter for relevancy of search results. This can be enabled by giving "enable": "true", within this field
defaultTypeif AND is specified then boolean operator AND would be used in searching multiple terms. If none is specified it would be OR search
pluginDomainThe domain of SearchBlox where the plugin has to fetch results

🚧

Email Plugin especially the filters will work only with Email collection as from, to subject fields are fetched in Email collection alone.