summaryrefslogtreecommitdiff
path: root/system/item
diff options
context:
space:
mode:
Diffstat (limited to 'system/item')
-rw-r--r--system/item/item.go8
-rw-r--r--system/item/types.go3
2 files changed, 7 insertions, 4 deletions
diff --git a/system/item/item.go b/system/item/item.go
index 4750ef5..227cd26 100644
--- a/system/item/item.go
+++ b/system/item/item.go
@@ -211,7 +211,7 @@ func (i Item) AfterReject(res http.ResponseWriter, req *http.Request) error {
}
// SearchMapping returns a default implementation of a Bleve IndexMappingImpl
-// partially implements db.Searchable
+// partially implements search.Searchable
func (i Item) SearchMapping() (*mapping.IndexMappingImpl, error) {
mapping := bleve.NewIndexMapping()
mapping.StoreDynamic = false
@@ -219,6 +219,12 @@ func (i Item) SearchMapping() (*mapping.IndexMappingImpl, error) {
return mapping, nil
}
+// IndexContent determines if a type should be indexed for searching
+// partially implements search.Searchable
+func (i Item) IndexContent() bool {
+ return false
+}
+
// Slug returns a URL friendly string from the title of a post item
func Slug(i Identifiable) (string, error) {
// get the name of the post item
diff --git a/system/item/types.go b/system/item/types.go
index dbf13af..bcae58a 100644
--- a/system/item/types.go
+++ b/system/item/types.go
@@ -26,9 +26,6 @@ var (
// if requested by a valid admin or user
ErrAllowHiddenItem = errors.New(`Allow hidden item`)
- // ErrNoSearchMapping can be used to tell the system not to create an index mapping
- ErrNoSearchMapping = errors.New(`No search mapping for item`)
-
// Types is a map used to reference a type name to its actual Editable type
// mainly for lookups in /admin route based utilities
Types map[string]func() interface{}