aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelee <eddy@gfxlabs.io>2022-03-17 14:08:36 -0500
committerelee <eddy@gfxlabs.io>2022-03-17 14:08:36 -0500
commita0df993cefd4872430097cbe598ab91b9817aea3 (patch)
treea45f69da241b19620b9a78d7270f9d25863d99ce
parent52ce8cc4f27f8a575147402244e2c084ef58a241 (diff)
downloadseaweedfs-a0df993cefd4872430097cbe598ab91b9817aea3.tar.xz
seaweedfs-a0df993cefd4872430097cbe598ab91b9817aea3.zip
cleanup, add a few comments
-rw-r--r--weed/filer/arangodb/arangodb_store.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go
index 7d47ce2d5..9095a96f9 100644
--- a/weed/filer/arangodb/arangodb_store.go
+++ b/weed/filer/arangodb/arangodb_store.go
@@ -106,11 +106,12 @@ func (store *ArangodbStore) connection(uris []string, user string, pass string)
&driver.EnsurePersistentIndexOptions{Name: "IDX_directory"}); err != nil {
return err
}
-
- if _, _, err = store.collection.EnsureFullTextIndex(ctx, []string{"directory"},
- &driver.EnsureFullTextIndexOptions{Name: "IDX_FULLTEXT_directory", MinLength: 1}); err != nil {
- return err
- }
+ // fulltext index not required since no prefix search
+ // user should just make one themselves if they intend on using it
+ // if _, _, err = store.collection.EnsureFullTextIndex(ctx, []string{"directory"},
+ // &driver.EnsureFullTextIndexOptions{Name: "IDX_FULLTEXT_directory", MinLength: 1}); err != nil {
+ // return err
+ // }
if _, _, err = store.collection.EnsurePersistentIndex(ctx, []string{"name"}, &driver.EnsurePersistentIndexOptions{
Name: "IDX_name",
@@ -267,6 +268,8 @@ func (store *ArangodbStore) ListDirectoryPrefixedEntries(ctx context.Context, di
return lastFileName, filer.ErrUnsupportedListDirectoryPrefixed
}
+//TODO: i must be misunderstanding what this function is supposed to do
+//so figure it out is the todo, i guess lol - aaaaa
//func (store *ArangodbStore) ListDirectoryPrefixedEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int64, prefix string, eachEntryFunc filer.ListEachEntryFunc) (lastFileName string, err error) {
// eq := ""
// if includeStartFile {
@@ -357,6 +360,7 @@ return d`, string(dirPath), eq, limit)
func (store *ArangodbStore) Shutdown() {
}
+//convert a string into arango-key safe hex bytes hash
func hashString(dir string) string {
h := md5.New()
io.WriteString(h, dir)