Skip to content

Commit 974fe7d

Browse files
author
Max Burnette
committed
update remaining compilation issues
1 parent 2ac4720 commit 974fe7d

File tree

7 files changed

+162
-93
lines changed

7 files changed

+162
-93
lines changed

app/api/Admin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class Admin @Inject() (userService: UserService,
171171
}
172172

173173
def reindex = ServerAdminAction { implicit request =>
174-
val msg = searches.indexAll(None)
174+
val msg = searches.indexAll()
175175
Ok(toJson(Map("status" -> msg)))
176176
}
177177
}

app/controllers/Collections.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class Collections @Inject() (datasets: DatasetService, collections: CollectionSe
449449
}
450450

451451
//index collection
452-
search.index(collection, true)
452+
search.index(collection, true, None)
453453

454454
//Add to Events Table
455455
val option_user = users.findByIdentity(identity)

app/services/SearchService.scala

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import play.api.libs.json._
1111
*
1212
*/
1313
trait SearchService {
14+
val queueName = "search"
1415

1516
def isEnabled(): Boolean
1617

@@ -24,10 +25,13 @@ trait SearchService {
2425
spaceid: Option[String], folderid: Option[String], field: Option[String], tag: Option[String],
2526
from: Option[Int], size: Option[Int], permitted: List[UUID], user: Option[User]): SearchResult
2627

27-
def createIndex()
28+
def createIndex(index: String)
29+
30+
// Swap default index with provided temporary reindex
31+
def swapIndex()
2832

2933
/** Delete all indices */
30-
def deleteAll()
34+
def deleteAll(idx: String)
3135

3236
/** Delete an index */
3337
def delete(id: String, docType: String = "clowder_object")
@@ -38,26 +42,26 @@ trait SearchService {
3842
/**
3943
* Reindex using a resource reference and route to correct handler
4044
*/
41-
def index(resource: ResourceRef, recursive: Boolean = true)
45+
def index(resource: ResourceRef, recursive: Boolean = true, idx: Option[String])
4246

4347
/**
4448
* Reindex the given collection, if recursive is set to true it will
4549
* also reindex all datasets and files.
4650
*/
47-
def index(collection: Collection, recursive: Boolean)
51+
def index(collection: Collection, recursive: Boolean, idx: Option[String])
4852

4953
/**
5054
* Reindex the given dataset, if recursive is set to true it will
5155
* also reindex all files.
5256
*/
53-
def index(dataset: Dataset, recursive: Boolean)
57+
def index(dataset: Dataset, recursive: Boolean, idx: Option[String])
5458

5559
/** Reindex the given file. */
56-
def index(file: File)
60+
def index(file: File, idx: Option[String])
5761

58-
def index(file: TempFile)
62+
def index(file: TempFile, idx: Option[String])
5963

60-
def index(section: Section)
64+
def index(section: Section, idx: Option[String])
6165

6266
def indexAll(): String
6367

0 commit comments

Comments
 (0)