From 8517feb1c6c5245c81ef10f7af7c96b736137e97 Mon Sep 17 00:00:00 2001 From: opennota Date: Fri, 15 Jan 2016 05:46:27 +0700 Subject: [PATCH] Fix some typos --- index.go | 6 +++--- index/firestorm/reader_terms.go | 2 +- index/store/kvstore.go | 2 +- index/store/test/isolation.go | 4 ++-- index_alias_impl.go | 2 +- index_impl.go | 2 +- query_fuzzy.go | 2 +- search/highlight/fragmenters/simple/fragmenter_simple.go | 2 +- search/highlight/term_locations.go | 2 +- search/levenshtein.go | 2 +- search/searchers/search_numeric_range.go | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/index.go b/index.go index 803b8a03..7c2cb5d1 100644 --- a/index.go +++ b/index.go @@ -71,7 +71,7 @@ func (b *Batch) Size() int { return len(b.internal.IndexOps) + len(b.internal.InternalOps) } -// String prints a user friendly string represenation of what +// String prints a user friendly string representation of what // is inside this batch. func (b *Batch) String() string { return b.internal.String() @@ -202,7 +202,7 @@ type Index interface { SetInternal(key, val []byte) error DeleteInternal(key []byte) error - // Name returns the name of the index (by deault this is the path) + // Name returns the name of the index (by default this is the path) Name() string // SetName lets you assign your own logical name to this index SetName(string) @@ -230,7 +230,7 @@ func New(path string, mapping *IndexMapping) (Index, error) { // The provided mapping will be used for all // Index/Search operations. // The specified index type will be used -// The specified kvstore implemenation will be used +// The specified kvstore implementation will be used // and the provided kvconfig will be passed to its // constructor. func NewUsing(path string, mapping *IndexMapping, indexType string, kvstore string, kvconfig map[string]interface{}) (Index, error) { diff --git a/index/firestorm/reader_terms.go b/index/firestorm/reader_terms.go index ba7f2724..6737a2e1 100644 --- a/index/firestorm/reader_terms.go +++ b/index/firestorm/reader_terms.go @@ -45,7 +45,7 @@ func newFirestormTermFieldReader(r *firestormReader, field uint16, term []byte) // NOTE: in firestorm the dictionary row is advisory in nature // it *may* tell us the correct out - // if this record does not exist, it DOES not mean that there isno + // if this record does not exist, it DOES not mean that there is no // usage, we must scan the term frequencies to be sure if dictionaryValue != nil { dictionaryRow, err := NewDictionaryRowKV(dictionaryKey, dictionaryValue) diff --git a/index/store/kvstore.go b/index/store/kvstore.go index d1ecea3e..e0735832 100644 --- a/index/store/kvstore.go +++ b/index/store/kvstore.go @@ -88,7 +88,7 @@ type KVIterator interface { // to do this in a way that is safe and makes sense type KVWriter interface { - // NewBatch returns a KVBatch for performaing batch operations on this kvstore + // NewBatch returns a KVBatch for performing batch operations on this kvstore NewBatch() KVBatch // ExecuteBatch will execute the KVBatch, the provided KVBatch **MUST** have diff --git a/index/store/test/isolation.go b/index/store/test/isolation.go index 2bceca7c..3a9f3840 100644 --- a/index/store/test/isolation.go +++ b/index/store/test/isolation.go @@ -8,7 +8,7 @@ import ( "github.com/blevesearch/bleve/index/store" ) -// tests focused on verfiying that readers are isolated from writers +// tests focused on verifying that readers are isolated from writers func CommonTestReaderIsolation(t *testing.T, s store.KVStore) { // insert a kv pair @@ -30,7 +30,7 @@ func CommonTestReaderIsolation(t *testing.T, s store.KVStore) { // reader is closed. // in general this is not a problem for bleve // (though it may affect performance in some cases) - // but it is a problem for this test which attemps + // but it is a problem for this test which attempts // to easily verify that readers are isolated // this hack writes enough initial data such that // the subsequent writes do not require additional diff --git a/index_alias_impl.go b/index_alias_impl.go index bc03c6b4..f80b5982 100644 --- a/index_alias_impl.go +++ b/index_alias_impl.go @@ -438,7 +438,7 @@ func (i *indexAliasImpl) Swap(in, out []Index) { // createChildSearchRequest creates a separate // request from the original // For now, avoid data race on req structure. -// TODO disable highligh/field load on child +// TODO disable highlight/field load on child // requests, and add code to do this only on // the actual final results. // Perhaps that part needs to be optional, diff --git a/index_impl.go b/index_impl.go index cee52ae2..f871a43a 100644 --- a/index_impl.go +++ b/index_impl.go @@ -172,7 +172,7 @@ func openIndexUsing(path string, runtimeConfig map[string]interface{}) (rv *inde return nil, err } - // backwards compatability if index type is missing + // backwards compatibility if index type is missing if rv.meta.IndexType == "" { rv.meta.IndexType = upside_down.Name } diff --git a/query_fuzzy.go b/query_fuzzy.go index 72624e31..2818035a 100644 --- a/query_fuzzy.go +++ b/query_fuzzy.go @@ -28,7 +28,7 @@ type fuzzyQuery struct { // fuzziness of the specified term. // The default fuzziness is 2. // -// The current implementation uses Leveshtein edit +// The current implementation uses Levenshtein edit // distance as the fuzziness metric. func NewFuzzyQuery(term string) *fuzzyQuery { return &fuzzyQuery{ diff --git a/search/highlight/fragmenters/simple/fragmenter_simple.go b/search/highlight/fragmenters/simple/fragmenter_simple.go index 55b33afe..8818660f 100644 --- a/search/highlight/fragmenters/simple/fragmenter_simple.go +++ b/search/highlight/fragmenters/simple/fragmenter_simple.go @@ -51,7 +51,7 @@ OUTER: } // if we still have more characters available to us - // push back towards begining + // push back towards beginning // without cross maxbegin for start > 0 && used < s.fragmentSize { r, size := utf8.DecodeLastRune(orig[0:start]) diff --git a/search/highlight/term_locations.go b/search/highlight/term_locations.go index 68946417..175bdcba 100644 --- a/search/highlight/term_locations.go +++ b/search/highlight/term_locations.go @@ -57,7 +57,7 @@ func (t TermLocations) Less(i, j int) bool { } // all the common array positions are the same if len(t[i].ArrayPositions) < len(t[j].ArrayPositions) { - return true // j array positions, longer so greather + return true // j array positions, longer so greater } else if len(t[i].ArrayPositions) > len(t[j].ArrayPositions) { return false // j array positions, shorter so less } diff --git a/search/levenshtein.go b/search/levenshtein.go index 7a647096..5201ab24 100644 --- a/search/levenshtein.go +++ b/search/levenshtein.go @@ -82,7 +82,7 @@ func LevenshteinDistanceMax(a, b *string, max int) (int, bool) { lastdiag = olddiag } - // after each row if rowmin isnt less than max stop + // after each row if rowmin isn't less than max stop if rowmin > max { return max, true } diff --git a/search/searchers/search_numeric_range.go b/search/searchers/search_numeric_range.go index 7c8bf9e5..5dfd8472 100644 --- a/search/searchers/search_numeric_range.go +++ b/search/searchers/search_numeric_range.go @@ -126,7 +126,7 @@ func incrementBytes(in []byte) []byte { for i := len(rv) - 1; i >= 0; i-- { rv[i] = rv[i] + 1 if rv[i] != 0 { - // didnt' overflow, so stop + // didn't overflow, so stop break } }