Skip to content

Commit

Permalink
Merge pull request #5 from stevenferrer/bugfix/typo
Browse files Browse the repository at this point in the history
fixed typo in FieldType struct
  • Loading branch information
stevenferrer authored Jun 28, 2020
2 parents 65071d8 + d58769c commit f93d24f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/stevenferrer/solr-go
go 1.14

require (
github.com/davecgh/go-spew v1.1.0
github.com/dnaeon/go-vcr v1.0.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
Expand Down
5 changes: 4 additions & 1 deletion schema/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ func TestModifySchema(t *testing.T) {
body: schema.FieldType{
Name: "myNewTextField",
Class: "solr.TextField",
IndexAnalyzier: &schema.Analyzer{
// with 2 analyzers
IndexAnalyzer: &schema.Analyzer{
Tokenizer: &schema.Tokenizer{
Class: "solr.PathHierarchyTokenizerFactory",
Delimeter: "/",
Expand All @@ -340,6 +341,8 @@ func TestModifySchema(t *testing.T) {
Name: "myNewTextField",
Class: "solr.TextField",
PositionIncrementGap: "100",
// with 1 analyzer, will be applied to both
// index and query analyzer
Analyzer: &schema.Analyzer{
Tokenizer: &schema.Tokenizer{
Class: "solr.StandardTokenizerFactory",
Expand Down
2 changes: 1 addition & 1 deletion schema/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func modifyingSchema() {
err = schemaClient.AddFieldType(context.Background(), collection, schema.FieldType{
Name: "myNewTextField",
Class: "solr.TextField",
IndexAnalyzier: &schema.Analyzer{
IndexAnalyzer: &schema.Analyzer{
Tokenizer: &schema.Tokenizer{
Class: "solr.PathHierarchyTokenizerFactory",
Delimeter: "/",
Expand Down
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type FieldType struct {
SubFieldSuffix string `json:"subFieldSuffix,omitempty"`
Dimension string `json:"dimension,omitempty"`
Analyzer *Analyzer `json:"analyzer,omitempty"`
IndexAnalyzier *Analyzer `json:"indexAnalyzer,omitempty"`
IndexAnalyzer *Analyzer `json:"indexAnalyzer,omitempty"`
QueryAnalyzer *Analyzer `json:"queryAnalyzer,omitempty"`
}

Expand Down

0 comments on commit f93d24f

Please sign in to comment.