replace sh with sdh
This commit is contained in:
parent
8dd42908a5
commit
0e179b6736
8 changed files with 18 additions and 18 deletions
|
@ -527,8 +527,8 @@ public class GsaApiManager extends BaseApiManager implements WebApiManager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSimilarHash() {
|
||||
return request.getParameter("sh");
|
||||
public String getSimilarDocHash() {
|
||||
return request.getParameter("sdh");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -668,8 +668,8 @@ public class JsonApiManager extends BaseJsonApiManager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSimilarHash() {
|
||||
return request.getParameter("sh");
|
||||
public String getSimilarDocHash() {
|
||||
return request.getParameter("sdh");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ public class SuggestApiManager extends BaseJsonApiManager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSimilarHash() {
|
||||
public String getSimilarDocHash() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public class SearchService {
|
|||
return SearchConditionBuilder.builder(searchRequestBuilder)
|
||||
.query(StringUtil.isBlank(sortField) ? query : query + " sort:" + sortField).offset(pageStart)
|
||||
.size(pageSize).facetInfo(params.getFacetInfo()).geoInfo(params.getGeoInfo())
|
||||
.similarHash(params.getSimilarHash()).responseFields(queryHelper.getResponseFields())
|
||||
.similarHash(params.getSimilarDocHash()).responseFields(queryHelper.getResponseFields())
|
||||
.searchRequestType(params.getType()).build();
|
||||
}, (searchRequestBuilder, execTime, searchResponse) -> {
|
||||
final QueryResponseList queryResponseList = ComponentUtil.getQueryResponseList();
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ListForm implements SearchRequestParams {
|
|||
|
||||
public String[] ex_q;
|
||||
|
||||
public String sh;
|
||||
public String sdh;
|
||||
|
||||
@Override
|
||||
public String getQuery() {
|
||||
|
@ -143,7 +143,7 @@ public class ListForm implements SearchRequestParams {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSimilarHash() {
|
||||
return sh;
|
||||
public String getSimilarDocHash() {
|
||||
return sdh;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class SearchForm implements SearchRequestParams {
|
|||
public Integer pn;
|
||||
|
||||
@Size(max = 1000)
|
||||
public String sh;
|
||||
public String sdh;
|
||||
|
||||
// advance
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class SearchForm implements SearchRequestParams {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSimilarHash() {
|
||||
return sh;
|
||||
public String getSimilarDocHash() {
|
||||
return sdh;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public interface SearchRequestParams {
|
|||
|
||||
SearchRequestType getType();
|
||||
|
||||
String getSimilarHash();
|
||||
String getSimilarDocHash();
|
||||
|
||||
public default String[] simplifyArray(final String[] values) {
|
||||
return stream(values).get(stream -> stream.filter(StringUtil::isNotBlank).distinct().toArray(n -> new String[n]));
|
||||
|
|
|
@ -56,11 +56,11 @@
|
|||
</la:link>
|
||||
</small>
|
||||
</c:if>
|
||||
<c:if test="${doc.similar_docs_count!=null}">
|
||||
<c:if test="${doc.similar_docs_count!=null&&doc.similar_docs_count>1}">
|
||||
<small class="hidden-md-down"> <la:link
|
||||
href="/search?q=${f:u(q)}&ex_q=${f:u(queryEntry.value)}&sh=${f:u(doc.similar_docs_hash)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
href="/search?q=${f:u(q)}&ex_q=${f:u(queryEntry.value)}&sdh=${f:u(doc.similar_docs_hash)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
<la:message key="labels.search_result_similar"
|
||||
arg0="${fe:formatNumber(doc.similar_docs_count)}" />
|
||||
arg0="${fe:formatNumber(doc.similar_docs_count-1)}" />
|
||||
</la:link>
|
||||
</small>
|
||||
</c:if>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<c:if
|
||||
test="${countEntry.value != 0 && fe:labelexists(countEntry.key)}">
|
||||
<li class="list-group-item"><la:link
|
||||
href="/search?q=${f:u(q)}&ex_q=label%3a${f:u(countEntry.key)}&sh=${f:u(sh)}${fe:pagingQuery(null)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
href="/search?q=${f:u(q)}&ex_q=label%3a${f:u(countEntry.key)}&sdh=${f:u(sh)}${fe:pagingQuery(null)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
${f:h(fe:label(countEntry.key))}
|
||||
<span class="label label-default label-pill pull-right">${f:h(countEntry.value)}</span>
|
||||
</la:link></li>
|
||||
|
@ -155,7 +155,7 @@
|
|||
<c:forEach var="queryEntry" items="${facetQueryView.queryMap}">
|
||||
<c:if test="${facetResponse.queryCountMap[queryEntry.value] != 0}">
|
||||
<li class="list-group-item p-l-md"><la:link
|
||||
href="/search?q=${f:u(q)}&ex_q=${f:u(queryEntry.value)}&sh=${f:u(sh)}${fe:pagingQuery(queryEntry.value)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
href="/search?q=${f:u(q)}&ex_q=${f:u(queryEntry.value)}&sdh=${f:u(sh)}${fe:pagingQuery(queryEntry.value)}${fe:facetQuery()}${fe:geoQuery()}">
|
||||
<la:message key="${queryEntry.key}" />
|
||||
<span class="label label-default label-pill pull-right">${f:h(facetResponse.queryCountMap[queryEntry.value])}</span>
|
||||
</la:link></li>
|
||||
|
|
Loading…
Add table
Reference in a new issue