• This repository has been archived on 28/Sep/2022
  • Stars
    star
    58
  • Rank 516,016 (Top 11 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created about 8 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go client library for Pilosa

Go Client for Pilosa

This repo archived Sept 2022 as part of the transition from Pilosa to FeatureBase. Please contact community[at]featurebase[dot]com with any questions.

GoDoc

Go client for Pilosa high performance distributed index.

What's New?

See: CHANGELOG

Requirements

  • Go 1.12 and higher.

Install

Download the library in your GOPATH using:

go get github.com/pilosa/go-pilosa

After that, you can import the library in your code using:

import "github.com/pilosa/go-pilosa"

Usage

Quick overview

Assuming Pilosa server is running at localhost:10101 (the default):

package main

import (
	"fmt"

	"github.com/pilosa/go-pilosa"
)

func main() {
	var err error

	// Create the default client
	client := pilosa.DefaultClient()

	// Retrieve the schema
	schema, err := client.Schema()

	// Create an Index object
	myindex := schema.Index("myindex")

	// Create a Field object
	myfield := myindex.Field("myfield")

	// make sure the index and the field exists on the server
	err = client.SyncSchema(schema)

	// Send a Set query. If err is non-nil, response will be nil.
	response, err := client.Query(myfield.Set(5, 42))

	// Send a Row query. If err is non-nil, response will be nil.
	response, err = client.Query(myfield.Row(5))

	// Get the result
	result := response.Result()
	// Act on the result
	if result != nil {
		columns := result.Row().Columns
		fmt.Println("Got columns: ", columns)
	}

	// You can batch queries to improve throughput
	response, err = client.Query(myindex.BatchQuery(
		myfield.Row(5),
		myfield.Row(10)))
	if err != nil {
		fmt.Println(err)
	}

	for _, result := range response.Results() {
		// Act on the result
		fmt.Println(result.Row().Columns)
	}
}

Documentation

Data Model and Queries

See: Data Model and Queries

Executing Queries

See: Server Interaction

Importing and Exporting Data

See: Importing and Exporting Data

Other Documentation

Contributing

See: CONTRIBUTING

License

See: LICENSE

More Repositories

1

featurebase

A crazy fast analytical database, built on bitmaps. Perfect for ML applications. Learn more at: http://docs.featurebase.com/. Start a Docker instance: https://hub.docker.com/r/featurebasedb/featurebase
Go
2,527
star
2

DoctorGPT

💻📚💡 DoctorGPT provides advanced LLM prompting for PDFs and webpages.
Python
230
star
3

python-pilosa

Python client library for Pilosa
Python
32
star
4

pdk

Pilosa Dev Kit - implementation tooling and use case examples are here!
Go
31
star
5

tools

Tools for development and ops
Go
20
star
6

getting-started

Code and Data for Getting Started documentation
Python
20
star
7

java-pilosa

Java client library for Pilosa
Java
19
star
8

picap

Network data use case showing PDK and Pilosa.
Go
7
star
9

featurebase-examples

Examples for FeatureBase Community
Python
6
star
10

console

JavaScript
6
star
11

cosmosa

Index Microsoft's Azure CosmosDB with Pilosa
Go
6
star
12

infrastructure

Assorted tools for operations and deployment of infrastructure
HCL
5
star
13

PythonGPT

PythonGPT writes and indexes code to implement dynamic code execution using generative models. Younger sibling of DoctorGPT.
Python
5
star
14

vis

Latex source for figures for Pilosa documentation, whitepapers, etc.
HTML
5
star
15

python-pilosa-roaring

This library implements Roaring Bitmaps with Pilosa 64 bit extension, compatible with Pilosa Roaring Bitmap imports.
Python
4
star
16

Laminoid

An ML instance manager
Python
3
star
17

slothbot

SlothBot | A generally useful analytical Discord bot that does support and writes SQL.
Python
3
star
18

notebooks

ipython notebooks for pilosa demonstrations/blog posts
Jupyter Notebook
3
star
19

SlothAI

A simple document pipeline manager for AI. Runs Python on AppEngine.
Python
3
star
20

helm

Helm Chart for a Pilosa Cluster
Smarty
2
star
21

lua-pilosa

Lua Client Library for Pilosa
Lua
2
star
22

python-featurebase

Python client for Featurebase SQL endpoint.
Python
2
star
23

java-pilosa-roaring

Roaring Bitmaps with Pilosa 64 bit extension, compatible with Pilosa Roaring Bitmap imports.
Java
2
star
24

demo-taxi

JavaScript
1
star
25

demo-ssb

Go
1
star
26

chem-usecase

Chemical Similarity Usecase
Python
1
star
27

mindy

An experimental Multi-INDex proxY
Go
1
star
28

www

Pilosa website
HTML
1
star
29

general

1
star
30

upgrade-utils

Go
1
star
31

unexport

Automatically unexport identifiers that are not used externally
Go
1
star
32

sample-ogg-handler

Repository for the article: Writing a Custom Handler for Oracle GoldenGate
Java
1
star
33

sql-examples

Example SQL queries for FeatureBase.
Python
1
star