fix #1628 add score and view fields
This commit is contained in:
parent
ee42b1bd55
commit
48f13ba981
1 changed files with 3 additions and 4 deletions
|
@ -26,6 +26,7 @@ import java.util.Map;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.core.stream.StreamUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.helper.QueryHelper;
|
||||
import org.codelibs.fess.helper.ViewHelper;
|
||||
import org.codelibs.fess.mylasta.direction.FessConfig;
|
||||
|
@ -44,8 +45,6 @@ public class QueryResponseList implements List<Map<String, Object>> {
|
|||
|
||||
private static final String ELLIPSIS = "...";
|
||||
|
||||
private static final String SCORE = "score";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(QueryResponseList.class);
|
||||
|
||||
private final List<Map<String, Object>> parent;
|
||||
|
@ -186,8 +185,8 @@ public class QueryResponseList implements List<Map<String, Object>> {
|
|||
docMap.put(fessConfig.getResponseFieldSitePath(), viewHelper.getSitePath(docMap));
|
||||
}
|
||||
|
||||
if (!docMap.containsKey(SCORE)) {
|
||||
docMap.put(SCORE, searchHit.getScore());
|
||||
if (!docMap.containsKey(Constants.SCORE)) {
|
||||
docMap.put(Constants.SCORE, searchHit.getScore());
|
||||
}
|
||||
return docMap;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue