AndyJames
11/28/2019 - 9:56 AM

FlowSearch API

You can use FlowSearch on the front end using the built in API. You can retrieve search data and even manipulate it. For example you could retrieve values and loope through data etc. You could also update a search query or even run a completely new query.

//Check when ready and then return FlowSearch Object (fs)
FlowSearch.onReady().then((fs) => {
  console.log(fs) 
});

The FlowSearch Object (fs)

Search Results and Aggregates (Filters)

Data (Search Results)

You can retrieve all search results using

FlowSearch.onReady().then((fs) => { var data = fs.searchResults console.log(data); // Do something with results });

isReady

FlowSearch.onReady().then((fs) => { console.log(fs.isReady); // Do something with results });

hasSearchResults

FlowSearch.onReady().then((fs) => { console.log(fs.hasSearchResults); // Do something with results });

isSearching

FlowSearch.onReady().then((fs) => { console.log(fs.isSearching); // Do something with results });

searchResultsCount

FlowSearch.onReady().then((fs) => { console.log(fs.searchResultsCount); // Do something with results });

searchResultsTotal

FlowSearch.onReady().then((fs) => { console.log(fs.searchResultsTotal); // Do something with results });


searchQueries: app.$store.getters['search/searchQueries'], filters: app.$store.getters['search/filters'], liveFilters: app.$store.getters['search/liveFilters'], mappings: app.$store.getters['mappings/mappings'], mappingsWithKeywords: app.$store.getters['mappings/mappingsWithKeywords'],

Methods

Query Builder

Learn more here..