From 2f48d7fb022bdab8575501bca59673f35e479cf6 Mon Sep 17 00:00:00 2001 From: Marty Schoch Date: Sun, 2 Oct 2016 12:11:15 -0400 Subject: [PATCH] fix misspellings --- cmd/bleve/cmd/create.go | 2 +- cmd/bleve/cmd/mapping.go | 2 +- http/handlers_test.go | 8 ++++---- index/smolder/reader_test.go | 2 +- index/upsidedown/reader_test.go | 2 +- search/collector/topn.go | 2 +- search/pool.go | 2 +- search/pool_test.go | 2 +- search/query/query_string_lex.go | 2 +- search/sort.go | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/bleve/cmd/create.go b/cmd/bleve/cmd/create.go index 6d6f09fc..696fc1ec 100644 --- a/cmd/bleve/cmd/create.go +++ b/cmd/bleve/cmd/create.go @@ -72,7 +72,7 @@ func buildMapping() (mapping.IndexMapping, error) { func init() { RootCmd.AddCommand(createCmd) - createCmd.Flags().StringVarP(&mappingPath, "mapping", "m", "", "Path to a file containing a JSON represenation of an index mapping to use.") + createCmd.Flags().StringVarP(&mappingPath, "mapping", "m", "", "Path to a file containing a JSON representation of an index mapping to use.") createCmd.Flags().StringVarP(&storeType, "store", "s", bleve.Config.DefaultKVStore, "The bleve storage type to use.") createCmd.Flags().StringVarP(&indexType, "index", "i", bleve.Config.DefaultIndexType, "The bleve index type to use.") } diff --git a/cmd/bleve/cmd/mapping.go b/cmd/bleve/cmd/mapping.go index f14e3faf..1df471d4 100644 --- a/cmd/bleve/cmd/mapping.go +++ b/cmd/bleve/cmd/mapping.go @@ -26,7 +26,7 @@ import ( var mappingCmd = &cobra.Command{ Use: "mapping [index path]", Short: "prints the mapping used for this index", - Long: `The mapping command prints a JSON represenation of the mapping used for this index.`, + Long: `The mapping command prints a JSON representation of the mapping used for this index.`, Run: func(cmd *cobra.Command, args []string) { mapping := idx.Mapping() jsonBytes, err := json.MarshalIndent(mapping, "", " ") diff --git a/http/handlers_test.go b/http/handlers_test.go index a6adeccf..830260ab 100644 --- a/http/handlers_test.go +++ b/http/handlers_test.go @@ -418,7 +418,7 @@ func TestHandlers(t *testing.T) { }, }, { - Desc: "search index doesnt exist", + Desc: "search index doesn't exist", Handler: searchHandler, Path: "/tix/search", Method: "POST", @@ -562,7 +562,7 @@ func TestHandlers(t *testing.T) { }, }, { - Desc: "create alias referring to non-existant index", + Desc: "create alias referring to non-existent index", Handler: aliasHandler, Path: "/alias", Method: "POST", @@ -650,7 +650,7 @@ func TestHandlers(t *testing.T) { ResponseBody: []byte(`{"status":"ok"}`), }, { - Desc: "update alias add doesnt exist", + Desc: "update alias add doesn't exist", Handler: aliasHandler, Path: "/alias", Method: "POST", @@ -674,7 +674,7 @@ func TestHandlers(t *testing.T) { ResponseBody: []byte(`{"status":"ok"}`), }, { - Desc: "update alias remove doesnt exist", + Desc: "update alias remove doesn't exist", Handler: aliasHandler, Path: "/alias", Method: "POST", diff --git a/index/smolder/reader_test.go b/index/smolder/reader_test.go index b1f26eb0..69f7506b 100644 --- a/index/smolder/reader_test.go +++ b/index/smolder/reader_test.go @@ -181,7 +181,7 @@ func TestIndexReader(t *testing.T) { } count = reader.Count() if count != 0 { - t.Errorf("expected count 0 for reader of non-existant field") + t.Errorf("expected count 0 for reader of non-existent field") } match, err = reader.Next(nil) if err != nil { diff --git a/index/upsidedown/reader_test.go b/index/upsidedown/reader_test.go index d0cf90f6..22317a3b 100644 --- a/index/upsidedown/reader_test.go +++ b/index/upsidedown/reader_test.go @@ -179,7 +179,7 @@ func TestIndexReader(t *testing.T) { } count = reader.Count() if count != 0 { - t.Errorf("expected count 0 for reader of non-existant field") + t.Errorf("expected count 0 for reader of non-existent field") } match, err = reader.Next(nil) if err != nil { diff --git a/search/collector/topn.go b/search/collector/topn.go index c4a6a46c..152d92f7 100644 --- a/search/collector/topn.go +++ b/search/collector/topn.go @@ -186,7 +186,7 @@ func (hc *TopNCollector) collectSingle(ctx *search.SearchContext, reader index.I } // optimization, we track lowest sorting hit already removed from heap - // with this one comparision, we can avoid all heap operations if + // with this one comparison, we can avoid all heap operations if // this hit would have been added and then immediately removed if hc.lowestMatchOutsideResults != nil { cmp := hc.sort.Compare(hc.cachedScoring, hc.cachedDesc, d, hc.lowestMatchOutsideResults) diff --git a/search/pool.go b/search/pool.go index 2671f13e..043e53f8 100644 --- a/search/pool.go +++ b/search/pool.go @@ -34,7 +34,7 @@ func defaultDocumentMatchPoolTooSmall(p *DocumentMatchPool) *DocumentMatch { } // NewDocumentMatchPool will build a DocumentMatchPool with memory -// pre-allocated to accomodate the requested number of DocumentMatch +// pre-allocated to accommodate the requested number of DocumentMatch // instances func NewDocumentMatchPool(size, sortsize int) *DocumentMatchPool { avail := make(DocumentMatchCollection, 0, size) diff --git a/search/pool_test.go b/search/pool_test.go index fdcab0e7..21df38b8 100644 --- a/search/pool_test.go +++ b/search/pool_test.go @@ -40,7 +40,7 @@ func TestDocumentMatchPool(t *testing.T) { // get one more and see if too many function is called extra := dmp.Get() if !tooManyCalled { - t.Fatal("expected too many function to be called, but wasnt") + t.Fatal("expected too many function to be called, but wasn't") } // return the first 10 diff --git a/search/query/query_string_lex.go b/search/query/query_string_lex.go index 33ea5c86..9c59cedd 100644 --- a/search/query/query_string_lex.go +++ b/search/query/query_string_lex.go @@ -128,7 +128,7 @@ func startState(l *queryStringLex, next rune, eof bool) (lexState, bool) { return inStrState, true } - // doesnt look like anything, just eat it and stay here + // doesn't look like anything, just eat it and stay here l.reset() return startState, true } diff --git a/search/sort.go b/search/sort.go index a1000b8b..51c18e6e 100644 --- a/search/sort.go +++ b/search/sort.go @@ -71,7 +71,7 @@ func ParseSearchSortObj(input map[string]interface{}) (SearchSort, error) { case "date": rv.Type = SortFieldAsDate default: - return nil, fmt.Errorf("unkown sort field type: %s", typ) + return nil, fmt.Errorf("unknown sort field type: %s", typ) } } mode, ok := input["mode"].(string)