Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/at15/go-solr

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/at15/go-solr

  • v0.0.0-20170907224417-4246479cc274
  • Source
  • Go
  • Socket score

Version published
Created
Source

go-solr

GoDoc Build Status codebeat badge

Solr client in golang

Usage

  • install the cli using go get -u github.com/at15/go-solr/cmd/solrgo, it can create core and index json document
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/at15/go-solr/solr"
)

const coreName = "job"

func main() {
    c := solr.Config{}
    solrClient, err := solr.NewClient(c)
    if err != nil {
        log.Fatal(err)
        return
    }
    if err := solrClient.IsUp(context.Background()); err != nil {
        log.Fatalf("Solr is not up %v", err)
        return
    }
    log.Println("Solr is up")
    solrClient.UseCore(coreName)
    if status, err := solrClient.DefaultCore.Status(context.Background(), false); err != nil {
        log.Fatalf("Check core status failed %v", err)
        return
    } else {
        log.Printf("Got status for core %s %v\n", coreName, status)
    }
}

Features

  • standalone command line util (single binary)
  • query builder
  • auto convert struct to JSON when ingest document

Not implemented

Roadmap

  • using managed schema
    • generate schema xml based on golang struct (w/o?) annotation
    • support schema less
  • query using JSON API
  • v2 API
  • collect metrics about upstream
  • client side load balancing

Alternatives

FAQs

Package last updated on 07 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc