Skip to content

Commit

Permalink
feat:Capitalize the priority field of IndexOption so that other syste…
Browse files Browse the repository at this point in the history
…ms can access this field from outside the package. (#7342)
  • Loading branch information
nowindexman authored Jan 12, 2025
1 parent f482f25 commit 4ef3af1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions schema/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type IndexOption struct {
Sort string // DESC, ASC
Collate string
Length int
priority int
Priority int
}

// ParseIndexes parse schema indexes
Expand Down Expand Up @@ -64,7 +64,7 @@ func (schema *Schema) ParseIndexes() []*Index {

idx.Fields = append(idx.Fields, index.Fields...)
sort.Slice(idx.Fields, func(i, j int) bool {
return idx.Fields[i].priority < idx.Fields[j].priority
return idx.Fields[i].Priority < idx.Fields[j].Priority
})
}
}
Expand Down Expand Up @@ -155,7 +155,7 @@ func parseFieldIndexes(field *Field) (indexes []Index, err error) {
Sort: settings["SORT"],
Collate: settings["COLLATE"],
Length: length,
priority: priority,
Priority: priority,
}},
})
}
Expand Down

0 comments on commit 4ef3af1

Please sign in to comment.