download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
/** | |
* Filters an array of objects using custom predicates. | |
* | |
* @param {Array} array: the array to filter | |
* @param {Object} filters: an object with the filter criteria | |
* @return {Array} | |
*/ | |
function filterArray(array, filters) { | |
const filterKeys = Object.keys(filters); | |
return array.filter(item => { |
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
// Example of using Underscore's _.debounce function | |
// debounce is useful for situations where you get multiple events fired | |
// from one action. For example resize event is sent multiple times when | |
// window is resized | |
var reloadIfResizeChange = _.debounce(function() { | |
window.location.reload(); | |
}, 200); | |
window.addEventListener('resize', reloadIfResizeChange); |
<!-- solrconfig.xml --> | |
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> | |
<lst name="defaults"> | |
<str name="config">data-config.xml</str> | |
<str name="update.chain">uuid</str> <!-- ADD THIS LINE--> | |
</lst> | |
</requestHandler> | |
<updateRequestProcessorChain name="uuid"> |
This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).
PHP 5.6 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :