ozone-search-helper
v6.2.4
Published
[![NPM version][npm-image]][npm-url] # ozone-search-helper
Downloads
520
Keywords
Readme
ozone-search-helper
Helper to build ozone-search query
usage
let searchQuery = new SearchQuery();
searchQuery.quicksearch('');
const searchGenerator = itemClient.search(searchQuery.searchRequest);
Search query can be chained. Example:
let searchQuery = new SearchQuery();
// ((type == 'aType' or contains 'hello') and 'myField' == 'aText)
// Order by 'creationDate'
searchQuery
.typeQuery('aType')
.or.quicksearch('hello')
.and.termQuery('myField','aText')
.order('creationDate').DESC;
searchQuery.quicksearch('').and;
const searchGenerator = itemClient.search(searchQuery.searchRequest);
Example:
let searchQuery = new SearchQuery();
// type == 'aType' or contains 'hello' or 'myField' == 'aText'
searchQuery
.typeQuery('aType')
.or
.quicksearch('hello')
.termQuery('myField','aText')
const searchGenerator = itemClient.search(searchQuery.searchRequest);
Install
$ npm install ozone-search-helper