Skip to content

Instantly share code, notes, and snippets.

@ianribas
ianribas / test.html
Last active March 9, 2016 18:25
JS Asynchronous Test Runner, on the browser
<!DOCTYPE html>
<html>
<head>
<title>Running asynchronous tests on the browser ...</title>
</head>
<body>
<ul id="alltests">
</ul>
<ul id="teststats">
<li>Passed <span id="passed"></span></li>
@ianribas
ianribas / gist:f76d20c21bb9f5c0df2f
Last active January 8, 2021 13:23
Elasticsearch problem with multi word query time synonyms and match queries with AND operator
#!/bin/bash
# delete old index if exists
curl -XDELETE 'http://localhost:9200/multiwordsyns?pretty'
# create index with synonym analyzer and mapping
curl -XPUT 'http://localhost:9200/multiwordsyns?pretty' -d '{
"settings" : {
"number_of_replicas": 0,
"number_of_shards": 1,