# README
bleve
modern text indexing in go - blevesearch.com
Try out bleve live by searching our wiki.
Features
- Index any go data structure (including JSON)
- Intelligent defaults backed up by powerful configuration
- Supported field types:
- Text, Numeric, Date
- Supported query types:
- Term, Phrase, Match, Match Phrase, Prefix
- Conjunction, Disjunction, Boolean
- Numeric Range, Date Range
- Simple query syntax for human entry
- tf-idf Scoring
- Search result match highlighting
- Supports Aggregating Facets:
- Terms Facet
- Numeric Range Facet
- Date Range Facet
Discussion
Discuss usage and development of bleve in the google group.
Indexing
message := struct{
Id string
From string
Body string
}{
Id: "example",
From: "[email protected]",
Body: "bleve indexing is easy",
}
mapping := bleve.NewIndexMapping()
index, err := bleve.New("example.bleve", mapping)
if err != nil {
panic(err)
}
index.Index(message.Id, message)
Querying
index, _ := bleve.Open("example.bleve")
query := bleve.NewQueryStringQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)
License
Apache License Version 2.0
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
DumpQuery returns a string representation of the query tree, where query string queries have been expanded into base queries.
MultiSearch executes a SearchRequest across multiple Index objects, then merges the results.
New index at the specified path, must not exist.
NewBooleanFieldMapping returns a default field mapping for booleans.
NewBooleanQuery creates a compound Query composed of several other Query objects.
NewBooleanQueryMinShould is the same as NewBooleanQuery, only it offers control of the minimum number of should queries that must be satisfied.
NewBoolFieldQuery creates a new Query for boolean fields.
NewConjunctionQuery creates a new compound Query.
NewDateRangeInclusiveQuery creates a new Query for ranges of date values.
NewDateRangeQuery creates a new Query for ranges of date values.
NewDateTimeFieldMapping returns a default field mapping for dates.
NewDisjunctionQuery creates a new compound Query.
NewDisjunctionQueryMin creates a new compound Query.
NewDocIDQuery creates a new Query object returning indexed documents among the specified set.
NewDocumentDisabledMapping returns a new document mapping that will not perform any indexing.
NewDocumentMapping returns a new document mapping with all the default values.
NewDocumentStaticMapping returns a new document mapping that will not automatically index parts of a document without an explicit mapping.
NewFacetRequest creates a facet on the specified field that limits the number of entries to the specified size.
NewFuzzyQuery creates a new Query which finds documents containing terms within a specific fuzziness of the specified term.
NewHighlight creates a default HighlightRequest.
NewHighlightWithStyle creates a HighlightRequest with an alternate style.
NewIndexAlias creates a new IndexAlias over the provided Index objects.
NewIndexMapping creates a new IndexMapping that will use all the default indexing rules.
No description provided by the author
NewMatchAllQuery creates a Query which will match all documents in the index.
NewMatchNoneQuery creates a Query which will not match any documents in the index.
NewMatchPhraseQuery creates a new Query object for matching phrases in the index.
NewMatchQuery creates a Query for matching text.
NewMatchQuery creates a Query for matching text.
NewMemOnly creates a memory-only index.
NewNumericFieldMapping returns a default field mapping for numbers.
NewNumericRangeInclusiveQuery creates a new Query for ranges of numeric values.
NewNumericRangeQuery creates a new Query for ranges of numeric values.
NewPhraseQuery creates a new Query for finding exact term phrases in the index.
NewPrefixQuery creates a new Query which finds documents containing terms that start with the specified prefix.
NewQueryStringQuery creates a new Query used for finding documents that satisfy a query string.
NewRegexpQuery creates a new Query which finds documents containing terms that match the specified regular expression.
NewSearchRequest creates a new SearchRequest for the Query, using default values for all other search parameters.
NewSearchRequestOptions creates a new SearchRequest for the Query, with the requested size, from and explanation search parameters.
NewTermQuery creates a new Query for finding an exact term match in the index.
NewTextFieldMapping returns a default field mapping for text.
NewUsing creates index at the specified path, which must not already exist.
NewWildcardQuery creates a new Query which finds documents containing terms that match the specified wildcard.
Open index at the specified path, must exist.
OpenUsing opens index at the specified path, must exist.
ParseQuery deserializes a JSON representation of a Query object.
SetLog sets the logger used for logging by default log messages are sent to ioutil.Discard.
# Constants
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Constant Error values which can be compared to determine the type of error.
Document must satisfy ALL of term searches.
Document must satisfy AT LEAST ONE of term searches.
# Variables
Config contains library level configuration.
control the default behavior for dynamic fields (those not explicitly mapped).
No description provided by the author
control the default behavior for dynamic fields (those not explicitly mapped).
# Structs
A Batch groups together multiple Index and Delete operations you would like performed at the same time.
A DocumentMapping describes how a type of document should be indexed.
A FacetRequest describes a facet or aggregation of the result document set you would like to be built.
A FieldMapping describes how a specific item should be put into the index.
HighlightRequest describes how field matches should be highlighted.
An IndexMapping controls how objects are placed into an index.
No description provided by the author
No description provided by the author
A SearchRequest describes all the parameters needed to search the index.
A SearchResult describes the results of executing a SearchRequest.
SearchStatus is a secion in the SearchResult reporting how many underlying indexes were queried, how many were successful/failed and a map of any errors that were encountered.
# Interfaces
A Classifier is an interface describing any object which knows how to identify its own type.
An Index implements all the indexing and searching capabilities of bleve.
An IndexAlias is a wrapper around one or more Index objects.
A Query represents a description of the type and parameters for a query into the index.
# Type aliases
Error represents a more strongly typed bleve error for detecting and handling specific types of errors.
FacetsRequest groups together all the FacetRequest objects for a single query.
IndexErrMap tracks errors with the name of the index where it occurred.
No description provided by the author