org.visallo.search.advanced

Add alternate search interfaces

Alternate search interfaces to replace the content in the search pane.

Each of the search interfaces has its own saved searches.

Registration

registry.registerExtension("org.visallo.search.advanced", config)

Source:
Tutorials:
See:
Configuration Properties:
Name Type Description
componentPath string

Path to org.visallo.search.advanced~Component

displayName string

The text to display in search dropdown (to select the type of search interface)

savedSearchUrl string

The endpoint to execute when search is changed

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return e.componentPath && e.displayName && e.savedSearchUrl;
}

Type Definitions

Component

Source:
See:

Responsible for displaying the interface for searching, and displaying the results.

Properties:
Name Type Attributes Description
resultsSelector string

Deprecated: Use renderResults function instead. Css selector of the container that will hold results

initialParameters object <optional>

The search endpoint parameters

renderResults function

takes a callback which is given the DOM node of the results container

updateQueryStatus updateQueryStatus

Display error/success message

Fires:
Listens:
Example

Rendering results

this.props.renderResults((resultsNode) => {
    List.attachTo($(resultsNode), {
         items: results
})

updateQueryStatus(statusopt)

Source:

Display the status of a submitted query. If no argument is given it will clear the current status.

Parameters:
Name Type Attributes Description
status object <optional>
Properties
Name Type Attributes Description
success boolean <optional>
error string <optional>

Custom error message to display

message string <optional>

Message to display on success (e.g. number of hits)

Events

savedQuerySelected

Source:
Properties:
Name Type Description
data object
Properties
Name Type Description
query object
Properties
Name Type Description
url string

The search endpoint

parameters object

The search endpoint parameters

Fired when user selects a saved search. AdvancedSearch components should listen and load the search

Listeners of This Event:

setCurrentSearchForSaving

Source:
Properties:
Name Type Description
data object
Properties
Name Type Description
url string

The endpoint url (should match extension point savedSearchUrl)

parameters object

The parameters to send to endpoint