-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FieldData for indexed fields, remove enum (#347)
* add FieldData * reorder imports * make FieldData fields private * move trigger_data to separate file * small cleanup and comments
- Loading branch information
1 parent
716eee2
commit 3bb49bc
Showing
6 changed files
with
81 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package mapping | ||
|
||
// FieldData is container for field-related parameters | ||
// name represents indexed object field name | ||
// nameTag represents highlight field name for given field in search result, if value is empty then the highlight for this field is not used | ||
// priority represents sort priority for given field | ||
type FieldData struct { | ||
name string | ||
nameTag string | ||
priority float64 | ||
} | ||
|
||
// GetName returns TriggerField name. | ||
func (field FieldData) GetName() string { | ||
return field.name | ||
} | ||
|
||
// GetTagValue returns TriggerField value used in marshalling. | ||
func (field FieldData) GetTagValue() string { | ||
return field.nameTag | ||
} | ||
|
||
// GetPriority returns field priority | ||
func (field FieldData) GetPriority() float64 { | ||
return field.priority | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters