0
0
Fork 0

fix misspellings

This commit is contained in:
Marty Schoch 2016-10-02 12:11:15 -04:00
parent 2dc2130633
commit 2f48d7fb02
10 changed files with 13 additions and 13 deletions

View File

@ -72,7 +72,7 @@ func buildMapping() (mapping.IndexMapping, error) {
func init() { func init() {
RootCmd.AddCommand(createCmd) 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(&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.") createCmd.Flags().StringVarP(&indexType, "index", "i", bleve.Config.DefaultIndexType, "The bleve index type to use.")
} }

View File

@ -26,7 +26,7 @@ import (
var mappingCmd = &cobra.Command{ var mappingCmd = &cobra.Command{
Use: "mapping [index path]", Use: "mapping [index path]",
Short: "prints the mapping used for this index", 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) { Run: func(cmd *cobra.Command, args []string) {
mapping := idx.Mapping() mapping := idx.Mapping()
jsonBytes, err := json.MarshalIndent(mapping, "", " ") jsonBytes, err := json.MarshalIndent(mapping, "", " ")

View File

@ -418,7 +418,7 @@ func TestHandlers(t *testing.T) {
}, },
}, },
{ {
Desc: "search index doesnt exist", Desc: "search index doesn't exist",
Handler: searchHandler, Handler: searchHandler,
Path: "/tix/search", Path: "/tix/search",
Method: "POST", 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, Handler: aliasHandler,
Path: "/alias", Path: "/alias",
Method: "POST", Method: "POST",
@ -650,7 +650,7 @@ func TestHandlers(t *testing.T) {
ResponseBody: []byte(`{"status":"ok"}`), ResponseBody: []byte(`{"status":"ok"}`),
}, },
{ {
Desc: "update alias add doesnt exist", Desc: "update alias add doesn't exist",
Handler: aliasHandler, Handler: aliasHandler,
Path: "/alias", Path: "/alias",
Method: "POST", Method: "POST",
@ -674,7 +674,7 @@ func TestHandlers(t *testing.T) {
ResponseBody: []byte(`{"status":"ok"}`), ResponseBody: []byte(`{"status":"ok"}`),
}, },
{ {
Desc: "update alias remove doesnt exist", Desc: "update alias remove doesn't exist",
Handler: aliasHandler, Handler: aliasHandler,
Path: "/alias", Path: "/alias",
Method: "POST", Method: "POST",

View File

@ -181,7 +181,7 @@ func TestIndexReader(t *testing.T) {
} }
count = reader.Count() count = reader.Count()
if count != 0 { 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) match, err = reader.Next(nil)
if err != nil { if err != nil {

View File

@ -179,7 +179,7 @@ func TestIndexReader(t *testing.T) {
} }
count = reader.Count() count = reader.Count()
if count != 0 { 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) match, err = reader.Next(nil)
if err != nil { if err != nil {

View File

@ -186,7 +186,7 @@ func (hc *TopNCollector) collectSingle(ctx *search.SearchContext, reader index.I
} }
// optimization, we track lowest sorting hit already removed from heap // 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 // this hit would have been added and then immediately removed
if hc.lowestMatchOutsideResults != nil { if hc.lowestMatchOutsideResults != nil {
cmp := hc.sort.Compare(hc.cachedScoring, hc.cachedDesc, d, hc.lowestMatchOutsideResults) cmp := hc.sort.Compare(hc.cachedScoring, hc.cachedDesc, d, hc.lowestMatchOutsideResults)

View File

@ -34,7 +34,7 @@ func defaultDocumentMatchPoolTooSmall(p *DocumentMatchPool) *DocumentMatch {
} }
// NewDocumentMatchPool will build a DocumentMatchPool with memory // 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 // instances
func NewDocumentMatchPool(size, sortsize int) *DocumentMatchPool { func NewDocumentMatchPool(size, sortsize int) *DocumentMatchPool {
avail := make(DocumentMatchCollection, 0, size) avail := make(DocumentMatchCollection, 0, size)

View File

@ -40,7 +40,7 @@ func TestDocumentMatchPool(t *testing.T) {
// get one more and see if too many function is called // get one more and see if too many function is called
extra := dmp.Get() extra := dmp.Get()
if !tooManyCalled { 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 // return the first 10

View File

@ -128,7 +128,7 @@ func startState(l *queryStringLex, next rune, eof bool) (lexState, bool) {
return inStrState, true 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() l.reset()
return startState, true return startState, true
} }

View File

@ -71,7 +71,7 @@ func ParseSearchSortObj(input map[string]interface{}) (SearchSort, error) {
case "date": case "date":
rv.Type = SortFieldAsDate rv.Type = SortFieldAsDate
default: 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) mode, ok := input["mode"].(string)