projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-0.8.2'
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
SearchPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/SearchPage.java
b/src/main/java/net/pterodactylus/sone/web/SearchPage.java
index
6e10b24
..
a4da9f4
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/SearchPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/SearchPage.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - SearchPage.java - Copyright © 2010 David Roden
+ * Sone - SearchPage.java - Copyright © 2010
–2012
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-40,12
+40,12
@@
import net.pterodactylus.util.cache.CacheItem;
import net.pterodactylus.util.cache.DefaultCacheItem;
import net.pterodactylus.util.cache.MemoryCache;
import net.pterodactylus.util.cache.ValueRetriever;
import net.pterodactylus.util.cache.DefaultCacheItem;
import net.pterodactylus.util.cache.MemoryCache;
import net.pterodactylus.util.cache.ValueRetriever;
-import net.pterodactylus.util.collection.Mapper;
-import net.pterodactylus.util.collection.Mappers;
import net.pterodactylus.util.collection.Pagination;
import net.pterodactylus.util.collection.TimedMap;
import net.pterodactylus.util.collection.Pagination;
import net.pterodactylus.util.collection.TimedMap;
-import net.pterodactylus.util.filter.Filter;
-import net.pterodactylus.util.filter.Filters;
+import net.pterodactylus.util.collection.filter.Filter;
+import net.pterodactylus.util.collection.filter.Filters;
+import net.pterodactylus.util.collection.mapper.Mapper;
+import net.pterodactylus.util.collection.mapper.Mappers;
import net.pterodactylus.util.logging.Logging;
import net.pterodactylus.util.number.Numbers;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.logging.Logging;
import net.pterodactylus.util.number.Numbers;
import net.pterodactylus.util.template.Template;
@@
-230,7
+230,7
@@
public class SearchPage extends SoneTemplatePage {
* @return The score of the expression
*/
private double calculateScore(List<Phrase> phrases, String expression) {
* @return The score of the expression
*/
private double calculateScore(List<Phrase> phrases, String expression) {
- logger.log(Level.FINEST,
"Calculating Score for “%s”…", expression
);
+ logger.log(Level.FINEST,
String.format("Calculating Score for “%s”…", expression)
);
double optionalHits = 0;
double requiredHits = 0;
int forbiddenHits = 0;
double optionalHits = 0;
double requiredHits = 0;
int forbiddenHits = 0;
@@
-250,10
+250,10
@@
public class SearchPage extends SoneTemplatePage {
}
score += Math.pow(1 - position / (double) expression.length(), 2);
index = position + phraseString.length();
}
score += Math.pow(1 - position / (double) expression.length(), 2);
index = position + phraseString.length();
- logger.log(Level.FINEST,
"Got hit at position %d.", position
);
+ logger.log(Level.FINEST,
String.format("Got hit at position %d.", position)
);
++matches;
}
++matches;
}
- logger.log(Level.FINEST,
"Score: %f", score
);
+ logger.log(Level.FINEST,
String.format("Score: %f", score)
);
if (matches == 0) {
continue;
}
if (matches == 0) {
continue;
}