Skip to content

Instantly share code, notes, and snippets.

View mohdashraf010897's full-sized avatar
✌️
Collaborating

Mohd Ashraf mohdashraf010897

✌️
Collaborating
View GitHub Profile
var Crypto = Class.create();
Crypto.prototype = {
initialize: function() {
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || (function (Math, undefined) {
/**
* CryptoJS namespace.
@mohdashraf010897
mohdashraf010897 / create_script_rule.js
Last active February 23, 2022 15:43
Creates a query rule with script action to perform sentiment analysis
curl 'https://appbase-demo-ansible-abxiydt-arc.searchbase.io/_rule' \
-H 'authority: appbase-demo-ansible-abxiydt-arc.searchbase.io' \
-H 'sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"' \
-H 'authorization: Basic YjdHTHJLeHNkOjA5NWUyZWFiLTM4MDAtNDkxYi1hYmY2LTZiMTVjZjhlZGY4Nw==' \
-H 'x-search-client: Appbase Dashboard' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'content-type: application/json' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'accept: */*' \
<SearchBox
componentId="search-box"
iconPosition="right"
:dataField="[
'original_title',
'original_title.search',
'authors.search',
'authors.raw',
'authors.autosuggest',
'authors',
<MultiList
componentId="Authors"
dataField="authors.keyword"
class="filter"
title="Select Authors"
selectAllLabel="All Authors"
:react="{ and: ['Ratings', 'search-box'] }"
/>
body {
margin: 0;
background: #f7f7f7;
}
.filter input {
height: unset;
}
.navbar {
<MultiList
componentId="genres-list"
dataField="genres.keyword"
className="genres-filter"
size={20}
sortBy="asc"
queryFormat="or"
selectAllLabel="All Genres"
showCheckbox={true}
showCount={true}
<RangeSlider
componentId="RangeSlider"
dataField="vote_average"
className="review-filter"
tooltipTrigger="hover"
range={{
start: 0,
end: 10,
}}
rangeLabels={{
<MultiDataList
componentId="language-list"
dataField="original_language.keyword"
className="language-filter"
size={100}
sortBy="asc"
queryFormat="or"
selectAllLabel="All Languages"
showCheckbox={true}
showSearch={true}
<ReactiveList
defaultQuery={() => ({ track_total_hits: true })}
componentId="results"
dataField={[
{ field: "original_title", weight: 3 },
{ field: "original_title.search", weight: 2 },
]}
react={{
and: [
"mainSearch",
<template>
<section class="container">
<ReactiveBase
app="gitxplore-app"
credentials="0f448043059d:a4264120-cd7a-4574-a449-2c5df0523cb1"
url="https://appbase-demo-ansible-abxiydt-arc.searchbase.io"
enableAppbase
>
</ReactiveBase>
</section>