Let's not search for title/authors for moderation
We have to find a more performant solution here.
This commit is contained in:
parent
1e56da1c01
commit
3b2688bdfc
1 changed files with 3 additions and 2 deletions
|
@ -98,8 +98,9 @@ func moderateSubmissionsHandler(h handler) {
|
||||||
}
|
}
|
||||||
for i, b := range res {
|
for i, b := range res {
|
||||||
data.Books[i].B = b
|
data.Books[i].B = b
|
||||||
_, data.Books[i].TitleFound, _ = h.db.GetBooks("title:"+b.Title, 1, 0)
|
// FIXME: there is a heavy performance issue searching for title/authors
|
||||||
_, data.Books[i].AuthorFound, _ = h.db.GetBooks("author:"+strings.Join(b.Authors, " author:"), 1, 0)
|
//_, data.Books[i].TitleFound, _ = h.db.GetBooks("title:"+b.Title, 1, 0)
|
||||||
|
//_, data.Books[i].AuthorFound, _ = h.db.GetBooks("author:"+strings.Join(b.Authors, " author:"), 1, 0)
|
||||||
data.Books[i].Comment, err = h.db.GetComment(b.ID)
|
data.Books[i].Comment, err = h.db.GetComment(b.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error getting comment for ", b.Title, " (", b.ID, "): ", err)
|
log.Error("Error getting comment for ", b.Title, " (", b.ID, "): ", err)
|
||||||
|
|
Reference in a new issue