ozone-search-helper
TypeScript icon, indicating that this package has built-in type declarations

6.2.4 • Public • Published

NPM version

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

Readme

Keywords

none

Package Sidebar

Install

npm i ozone-search-helper

Weekly Downloads

95

Version

6.2.4

License

ISC

Unpacked Size

37.5 kB

Total Files

15

Last publish

Collaborators

  • simonhardy
  • aduchate
  • lomancel
  • dani_rocha
  • hubjac1