Bleve

Full-Text Indexing and Search for Go 10 July 2015 Marty Schoch

Why?

Lucene/Solr/Elasticsearch are awesome Could we build 50% of Lucene's text analysis, combine it with off-the-shelf KV stores and get something interesting?

1

Install bleve

go get github.com/blevesearch/bleve/...

2

Import 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

import "github.com/blevesearch/bleve" type Person struct { Name string } func main() { mapping := bleve.NewIndexMapping() index, err := bleve.New("people.bleve", mapping) if err != nil { log.Fatal(err) } person := Person{"Marty Schoch"} err = index.Index("m1", person) if err != nil { log.Fatal(err) } fmt.Println("Indexed Document") }

3

Data Model 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

import "github.com/blevesearch/bleve" type Person struct { Name string } func main() { mapping := bleve.NewIndexMapping() index, err := bleve.New("people.bleve", mapping) if err != nil { log.Fatal(err) } person := Person{"Marty Schoch"} err = index.Index("m1", person) if err != nil { log.Fatal(err) } fmt.Println("Indexed Document") }

4

Index Mapping 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

import "github.com/blevesearch/bleve" type Person struct { Name string } func main() { mapping := bleve.NewIndexMapping() index, err := bleve.New("people.bleve", mapping) if err != nil { log.Fatal(err) }

26 27 28 29 }

person := Person{"Marty Schoch"} err = index.Index("m1", person) if err != nil { log.Fatal(err) } fmt.Println("Indexed Document")

5

Create a New Index 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

import "github.com/blevesearch/bleve" type Person struct { Name string } func main() { mapping := bleve.NewIndexMapping() index, err := bleve.New("people.bleve", mapping) if err != nil { log.Fatal(err) }

25 26 27 28 29 }

person := Person{"Marty Schoch"} err = index.Index("m1", person) if err != nil { log.Fatal(err) } fmt.Println("Indexed Document")

6

Index Data 10 11 12 13 14 15 16 17 18 19 20 21 22 23

import "github.com/blevesearch/bleve" type Person struct { Name string } func main() { mapping := bleve.NewIndexMapping() index, err := bleve.New("people.bleve", mapping) if err != nil { log.Fatal(err) }

24 25 26 27 28 29 }

person := Person{"Marty Schoch"} err = index.Index("m1", person) if err != nil { log.Fatal(err) } fmt.Println("Indexed Document") Run

7

Open Index 15 func main() { 16 index, err := bleve.Open("people.bleve") 17 if err != nil { 18 log.Fatal(err) 19 } 20 21 query := bleve.NewTermQuery("marty") 22 request := bleve.NewSearchRequest(query) 23 result, err := index.Search(request) 24 if err != nil { 25 log.Fatal(err) 26 } 27 fmt.Println(result) 28 }

8

Build Query 15 func main() { 16 index, err := bleve.Open("people.bleve") 17 if err != nil { 18 log.Fatal(err) 19 } 20 21 query := bleve.NewTermQuery("marty") 22 request := bleve.NewSearchRequest(query) 23 result, err := index.Search(request) 24 if err != nil { 25 log.Fatal(err) 26 } 27 28 }

fmt.Println(result)

9

Build Request 15 func main() { 16 index, err := bleve.Open("people.bleve") 17 if err != nil { 18 log.Fatal(err) 19 } 20 21 query := bleve.NewTermQuery("marty") 22 request := bleve.NewSearchRequest(query) 23 result, err := index.Search(request) 24 if err != nil { 25 log.Fatal(err) 26 27 28 }

} fmt.Println(result)

10

Search 15 func main() { 16 index, err := bleve.Open("people.bleve") 17 if err != nil { 18 log.Fatal(err) 19 } 20 21 query := bleve.NewTermQuery("marty") 22 request := bleve.NewSearchRequest(query) 23 result, err := index.Search(request) 24 if err != nil { 25 log.Fatal(err) 26 } 27 fmt.Println(result) 28 }

Run

11

Query Strings Simple query language for humans +content:debugger word_count:>30 title:"delve debugger" title:go~2 -content:rust

12

Optional HTTP Handlers import "github.com/blevesearch/bleve/http"

All major bleve operations mapped Assume JSON document bodies See bleve-explorer sample app https://github.com/blevesearch/bleve-explorer

13

GopherCon Site Search

14

Join the Community

#bleve is small/quiet room, talk to us real time

Discuss your use-case Plan a feature implementation

Apache License v2.0, Report Issues, Submit Pull Requests 15

Thank you Marty Schoch [email protected] (mailto:[email protected]) http://github.com/blevesearch/bleve (http://github.com/blevesearch/bleve) http://www.blevesearch.com/ (http://www.blevesearch.com/) @mschoch (http://twitter.com/mschoch) @blevesearch (http://twitter.com/blevesearch)

Full-Text Indexing and Search for Go 10 July 2015 - GitHub

Jul 10, 2015 - All major bleve operations mapped. Assume JSON document bodies. See bleve-explorer sample app https://github.com/blevesearch/bleve- ...

821KB Sizes 3 Downloads 209 Views

Recommend Documents

Text Indexing for Go 1 February 2015 - GitHub
Feb 1, 2015 - NewSearchRequest(q) req.Highlight=bleve.NewHighlightWithStyle("html") req.Fields=[]string{"summary","speaker"} res,err:=index.Search(req).

Distributed Indexing for Semantic Search - Semantic Web
Apr 26, 2010 - 3. INDEXING RDF DATA. The index structures that need to be built for any par- ticular search ... simplicity, we will call this a horizontal index on the basis that RDF ... a way to implement a secondary sort on values by rewriting.

EFFICIENT SPEECH INDEXING AND SEARCH FOR ...
photos, videos, and voice mail, as well as weather forecasts, news, and device-specific commands and bookmarks. The purpose of speech search is to identify ...

WT/DS491/2 10 July 2015 - WorldTradeLaw.net
Jul 10, 2015 - Subsidies and Countervailing Measures ("SCM Agreement"), with respect .... facts available in support of its investigations and determinations ...

WT/DS491/2 10 July 2015 - WorldTradeLaw.net
Jul 10, 2015 - Subsidies and Countervailing Measures ("SCM Agreement"), with respect .... facts available in support of its investigations and determinations ...

Lattice Indexing For Large-Scale Web-Search ...
Results are presented for three types of typi- cal web audio ... dio or video file, while ignoring the actual audio content. This paper is ... of storage space. (Chelba ...

Efficient Indexing for Large Scale Visual Search
local feature-based image retrieval systems, “bag of visual terms” (BOV) model is ... with the same data structure, and answer a query in a few milliseconds [2].

Go Circuit - GitHub
OPS controls networking, execution, provisioning, failure response, etc. Elementary to deploy. Compile entire solution into one “smart” binary .... Worker services.

Ontario Regulation - Audit Committees Rev July 10 2015.pdf ...
Page 1 of 6. 1. Français. Education Act. ONTARIO REGULATION 361/10. AUDIT COMMITTEES. Consolidation Period: From July 10, 2015 to the e-Laws currency date. Last amendment: O. Reg. 204/15. This is the English version of a bilingual regulation. Interp

Go kit - GitHub
Go kit services must play nice With existing services. C. (l ... configuration. We'll work With whatever your organization prefers: flags, env vars, conf files - all OK.

20140615 Entity Linking and Retrieval for Semantic Search ... - GitHub
Jun 15, 2014 - blog posts. - tweets. - queries. - ... - Entities: typically taken from a knowledge base. - Wikipedia. - Freebase. - ... Page 24 ... ~24M senses ...

20140615 Entity Linking and Retrieval for Semantic Search ... - GitHub
Wikipedia Miner. [Milne & Witten 2008b]. - Open source. - (Public) web service. - Java. - Hadoop preprocessing pipeline. - Lexical matching + machine learning.

Jan/July 2015
Course : MES-031 : ET – AN OVERVIEW. Answer the following questions in about 500 words each. a) Explain the concept of educational technology. Discuss ...

Jan/July 2015
School of Education ... a) Explain the concept of educational technology. ... a) Describe the process of communication and the ways to overcome the barriers to.

Go Quick Reference Go Quick Reference Go Quick Reference - GitHub
Structure - Package package mylib func CallMeFromOutside. Format verbs. Simpler than Cās. MOAR TABLE package anothermain import (. "fmt". ) func main() {.

datasheet search site | www.alldatasheet.com - GitHub
Jun 1, 2007 - ADC accuracy (fPCLK2 = 14 MHz, fADC = 14 MHz, RAIN

datasheet search site | www.alldatasheet.com - GitHub
DESCRIPTION. The L78M00 series of three-terminal positive regulators is available in TO-220, TO-220FP,. DPAK and IPAK packages and with several fixed.

What is Hibernate Search? - GitHub
2015 - MARTIN BRAUN - APPLIED COMPUTER SCIENCE IV, UNIVERSITY OF BAYREUTH. 1. Introduction. Hibernate Search with Hibernate ORM: Database.

datasheet search site == www.icpdf.com - GitHub
Notebook Computers. Package Types. Figure 1. ... 由 Foxit PDF Editor 编 .... 9. Techcode®. 2A 32V Synchronous Rectified Step-Down Converter TD1519(A).