fix search stalemate & mate
This commit is contained in:
parent
ef46d939d6
commit
5c1077ee3c
|
@ -29,6 +29,8 @@ object Query {
|
||||||
|
|
||||||
val notFinished: DBObject = DBObject("status" -> Status.Started.id)
|
val notFinished: DBObject = DBObject("status" -> Status.Started.id)
|
||||||
|
|
||||||
|
val frozen: DBObject = "status" $gte Status.Mate.id
|
||||||
|
|
||||||
val popular: DBObject = "bm" $gt 0
|
val popular: DBObject = "bm" $gt 0
|
||||||
|
|
||||||
def clock(c: Boolean): DBObject = "clock.l" $exists c
|
def clock(c: Boolean): DBObject = "clock.l" $exists c
|
||||||
|
|
|
@ -52,7 +52,7 @@ final class Indexer(
|
||||||
}
|
}
|
||||||
|
|
||||||
private def indexQuery(query: DBObject): IO[Int] = io {
|
private def indexQuery(query: DBObject): IO[Int] = io {
|
||||||
val cursor = gameRepo find (GameQuery.finished ++ query) sort GameQuery.sortCreated //limit 3000
|
val cursor = gameRepo find (GameQuery.frozen ++ query) sort GameQuery.sortCreated //limit 3000
|
||||||
var nb = 0
|
var nb = 0
|
||||||
for (games ← cursor grouped 5000) {
|
for (games ← cursor grouped 5000) {
|
||||||
//println("Indexing from %d to %d".format(nb, nb + games.size))
|
//println("Indexing from %d to %d".format(nb, nb + games.size))
|
||||||
|
|
|
@ -158,7 +158,10 @@ moreCss = moreCss) {
|
||||||
@game.widgets(pager.currentPageResults)
|
@game.widgets(pager.currentPageResults)
|
||||||
</div>
|
</div>
|
||||||
} else {
|
} else {
|
||||||
<div class="search_status">No game found</div>
|
<div class="search_status">
|
||||||
|
No game found -
|
||||||
|
<a class="permalink" href="@routes.Search.form()">Permalink</a>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}.getOrElse {
|
}.getOrElse {
|
||||||
<div class="search_status">Search ready</div>
|
<div class="search_status">Search ready</div>
|
||||||
|
|
3
todo
3
todo
|
@ -40,11 +40,8 @@ add more system messages to the game chat http://en.lichess.org/forum/lichess-fe
|
||||||
chess960 second rematch random position http://en.lichess.org/forum/lichess-feedback/return-game-chess-960#1
|
chess960 second rematch random position http://en.lichess.org/forum/lichess-feedback/return-game-chess-960#1
|
||||||
count ai games in nb wins/losses http://en.lichess.org/@/ivym http://en.lichess.org/forum/lichess-feedback/how-do-the-game-totals-work#1
|
count ai games in nb wins/losses http://en.lichess.org/@/ivym http://en.lichess.org/forum/lichess-feedback/how-do-the-game-totals-work#1
|
||||||
-> user_stats collection for all nb* fields
|
-> user_stats collection for all nb* fields
|
||||||
search date filter bug
|
|
||||||
stalemate filter bug
|
|
||||||
index game positions
|
index game positions
|
||||||
integrate with google+
|
integrate with google+
|
||||||
elo stats
|
elo stats
|
||||||
permalink without results
|
|
||||||
merge timeout and outoftime
|
merge timeout and outoftime
|
||||||
feedback changes to do http://en.lichess.org/forum/lichess-feedback/new-feature-landing-advanced-search#3
|
feedback changes to do http://en.lichess.org/forum/lichess-feedback/new-feature-landing-advanced-search#3
|
||||||
|
|
Loading…
Reference in a new issue