|
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
|
|
|
|
import java.util.Properties; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletRequestWrapper; |
|
|
|
|
|
|
|
|
|
import com.liferay.portal.kernel.exception.SystemException; |
|
|
|
|
import com.liferay.portal.kernel.log.Log; |
|
|
|
@ -91,7 +92,7 @@ public class IntPraticaAdvancedSearch {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Hits searchAltriProgetti(HttpServletRequest request, User user, int start, int end) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SearchContext searchContext = SearchContextFactory.getInstance(request); |
|
|
|
|
searchContext.setKeywords(OVERRIDE_KEYWORDS.toString()); |
|
|
|
|
searchContext.setAttribute("paginationType", "more"); |
|
|
|
@ -516,11 +517,23 @@ public class IntPraticaAdvancedSearch {
|
|
|
|
|
private static void queryTipoProcedura(HttpServletRequest request, BooleanQuery booleanQuery, |
|
|
|
|
SearchContext searchContext) throws ParseException { |
|
|
|
|
String tipoProcedura = ParamUtil.getString(request, PortosIndexField.TIPO_PROCEDURA); |
|
|
|
|
// EVOLUTIVA per filtro ospedaliera
|
|
|
|
|
// Boolean praticaOspedaliera = ParamUtil.getBoolean(request, "praticaospedaliera");
|
|
|
|
|
if (Validator.isNotNull(tipoProcedura)) { |
|
|
|
|
TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.TIPO_PROCEDURA, |
|
|
|
|
tipoProcedura); |
|
|
|
|
if (Validator.isNotNull(termQuery)) { |
|
|
|
|
booleanQuery.add(termQuery, BooleanClauseOccur.MUST); |
|
|
|
|
if("H".equals(tipoProcedura)){ |
|
|
|
|
_log.debug("tipoProcedura: "+tipoProcedura); |
|
|
|
|
tipoProcedura = "B"; |
|
|
|
|
TermQuery ospedalieraTermQuery = TermQueryFactoryUtil.create(searchContext, "praticaospedaliera", |
|
|
|
|
"true"); |
|
|
|
|
if (Validator.isNotNull(ospedalieraTermQuery)) { |
|
|
|
|
booleanQuery.add(ospedalieraTermQuery, BooleanClauseOccur.MUST); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
TermQuery termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.TIPO_PROCEDURA, |
|
|
|
|
tipoProcedura); |
|
|
|
|
if (Validator.isNotNull(termQuery)) { |
|
|
|
|
booleanQuery.add(termQuery, BooleanClauseOccur.MUST); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|