Skip to content

Instantly share code, notes, and snippets.

View janhoy's full-sized avatar

Jan Høydahl janhoy

View GitHub Profile
@janhoy
janhoy / install-windows-service.groovy
Created April 17, 2013 23:43
First attempt for a solution for issue 28
def cli = new CliBuilder(usage: 'install-windows-service.bat [-a] -s name -jm jvmMem -jh javaHome -p installPath -sh solrHome -sd solrDataDir -sl solrLogDir -ss startService -sc solrCloud -zr dzkrun -zh dzkhost',
header: 'Windows Service Installer')
cli.a longOpt: 'auto','auto install the service'
cli.s longOpt: 'serviceName', required:true, args: 1, 'Windows service name, REQUIRED'
cli.jm longOpt: 'jvmMem', args: 1, 'JVM memory, REQUIRED'
cli.jh longOpt: 'javaHome', args: 1, 'value of JAVA_HOME, REQUIRED'
cli.p longOpt: 'installPath', args: 1, 'OpenESP install path, REQUIRED'
cli.sh longOpt: 'solrHome', args: 1, 'Solr home directory, REQUIRED'
cli.sd longOpt: 'solrDataDir', args: 1, 'Solr data directory, REQUIRED'
cli.sl longOpt: 'solrLogDir', args: 1, 'Solr log directory, REQUIRED'
{
"authentication": {
"class": "solr.BasicAuthPlugin",
"credentials": {
"admin": "HZtl83vopLyZfOpGedEQveAwvVdAQ1Ukr6dDJPEfs/w= MTIz",
"solr": "i9buKe/RhJV5bF/46EI9xmVVYyrnbg9zXf+2FrFwcy0= OTg3"
}
},
"authorization": {
"class": "solr.RuleBasedAuthorizationPlugin",
@janhoy
janhoy / Makefile
Last active February 13, 2017 10:21
pylucene-build-errors-macos
# Makefile for building PyLucene
#
# Supported operating systems: Mac OS X, Linux and Windows.
# See INSTALL file for requirements.
# See jcc/INSTALL for information about --shared.
#
# Steps to build
# 1. Edit the sections below as documented
# 2. Edit the JARS variable to add optional contrib modules not defaulted
@janhoy
janhoy / hadoop-doap.rdf
Created February 15, 2017 21:33
hadoop-doap
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"?>
<rdf:RDF xml:lang="en"
xmlns="http://usefulinc.com/ns/doap#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:asfext="http://projects.apache.org/ns/asfext#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<!--
=======================================================================
@janhoy
janhoy / jvm-mon.rb
Created March 27, 2017 11:25
jvm-mon brew formulae
# Documentation: http://docs.brew.sh/Formula-Cookbook.html
# http://www.rubydoc.info/github/Homebrew/brew/master/Formula
class JvmMon < Formula
desc "Console based JVM monitoring"
homepage "https://github.com/ajermakovics/jvm-mon"
url "https://github.com/ajermakovics/jvm-mon/releases/download/0.2/jvm-mon-0.2.tar.gz"
sha256 "3f85e8fec42449d8af831657ede96c9b7a5d12e80b35dbbc14f2e00eae301f28"
depends_on :java => "1.8+"
@janhoy
janhoy / optimize-pdf
Created March 28, 2017 09:37
optimize-pdf with fallback to dockerized gs
#!/bin/bash
# Optimizes and compresses the specified PDF using Ghostscript (gs).
# If gs is not found on path, will attempt with dockerized gs
#
# [NOTE]
# You need at least Ghostscript 9.10 in order for page labels defined in the
# PDF to be preserved (e.g., front matter pages numbered using roman numerals).
if [ -z $1 ]; then
@janhoy
janhoy / stack.txt
Created March 29, 2017 14:53
pf4j-stacktrace
100206 ERROR (main) [ ] r.f.p.AbstractPluginManager plugins/extraction-6.5.0.zip/classes/META-INF/MANIFEST.MF: Not a directory
ro.fortsoft.pf4j.PluginException: plugins/extraction-6.5.0.zip/classes/META-INF/MANIFEST.MF: Not a directory
at ro.fortsoft.pf4j.DefaultPluginDescriptorFinder.readManifest(DefaultPluginDescriptorFinder.java:57)
at ro.fortsoft.pf4j.ManifestPluginDescriptorFinder.find(ManifestPluginDescriptorFinder.java:34)
at ro.fortsoft.pf4j.AbstractPluginManager.loadPluginFromPath(AbstractPluginManager.java:753)
at ro.fortsoft.pf4j.AbstractPluginManager.loadPlugin(AbstractPluginManager.java:191)
at ro.fortsoft.pf4j.update.UpdateManager.installPlugin(UpdateManager.java:138)
at org.apache.solr.util.pf4j.Pf4jPlugins.install(Pf4jPlugins.java:96)
at org.apache.solr.util.pf4j.Pf4jPluginsTest.install(Pf4jPluginsTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@janhoy
janhoy / solr-release-notes70.md
Last active September 20, 2017 21:31
Solr 7 release notes

Release notes for Apache Solr 7.0.0

Solr is the popular, blazing fast, open source NoSQL search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable, providing fault tolerant distributed search and indexing, and powers the search and navigation features of many of the world's largest internet sites.

Solr 7.0 is available for immediate download at: http://lucene.apache.org/solr/mirrors-solr-latest-redir.html

See http://lucene.apache.org/solr/7_0_0/changes/Changes.html for a full list of details.

Solr 7.0 Release Highlights:

  • Replica Types - There is now support for different replica types, that can handle updates differently.
@janhoy
janhoy / description.md
Created January 11, 2018 12:54
nested-problem
  1. Create an index

     solr create -c nested
    
  2. Index two documents, where one is nested.

     curl localhost:8983/solr/a/update -d '<add>
        <doc>
          <field name="id">friend</field>
    

other

@janhoy
janhoy / original.json
Last active October 25, 2018 14:56
Example of what MediaStats looks like with various formats
{
"11": [{
"key": "2017-10-22T22:00:00.000Z",
"value": 0
}, {
"key": "2017-10-29T22:00:00.000Z",
"value": 0
}, {
"key": "2017-11-05T22:00:00.000Z",
"value": 0