Skip to content

Instantly share code, notes, and snippets.

View JoshEllinger's full-sized avatar
:shipit:
Always be shipping

Josh Ellinger JoshEllinger

:shipit:
Always be shipping
  • Lucidworks
  • San Francisco, CA
  • 20:38 (UTC -07:00)
  • X @JoshEllinger
View GitHub Profile
@JoshEllinger
JoshEllinger / path_extractions_stage.js
Created May 30, 2018 21:56
Path extractions js stage
function(doc, ctx, collection, solrServer, solrServerFactory) {
if (doc.getId() !== null) {
var prefix = '_cloud_field_';
var path_maximum = 10;
// set domain field
doc.setField(prefix + 'domain', getOrigin());
// set path fields
var paths = getPathFragments();
function doWork(doc) {
function formatNumberAsRaw(data){
if(data.indexOf('K')){
var splitData = data.split('K');
var result = Number(splitData[0]) * 1000;
return result.toString();
}
return data;
}
function updateFieldValue(fieldName) {
@JoshEllinger
JoshEllinger / nginx.conf
Last active November 18, 2016 01:07
Example nginx.conf file for lucidworks view on port 443 and 80
server {
listen 80;
# Change 'example.com' to the name of your site
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/build;
charset utf-8;
@JoshEllinger
JoshEllinger / Readme.md
Last active April 13, 2016 21:30
Steps to package a file (you need to run these on each build target machine 1x for mac, 1x for linux etc.)
  1. Install npm package locally
npm install
  1. Install bower locally
bower install
  1. Change the View version to be the latest version using the version command (in this case 1.0.0)
define(['angular'], function(angular){
'use strict';
/**
* Equalise Heights
*
* @param string jQuery Selector of which to equalise
*/
angular.module('Directives')