Feature/search 2446 (#90)

* [SEARCH-2446]
Changes for supporting ElasticSearchSearchService
This commit is contained in:
Elia Porciani
2020-10-26 14:17:01 +01:00
committed by GitHub
parent 7b66fac26e
commit 5618700d16
16 changed files with 325 additions and 114 deletions

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.web.scripts.solr;
import java.util.HashMap;
@@ -118,7 +118,7 @@ public class StatsGet extends DeclarativeWebScript
Pair<LocalDate, LocalDate> startAndEnd = getStartAndEndDates(req.getParameter("startDate"),req.getParameter("endDate"));
query = buildQuery(siteInfo, facetKey, startAndEnd);
StatsParameters params = new StatsParameters(SearchService.LANGUAGE_SOLR_FTS_ALFRESCO, query, false);
StatsParameters params = new StatsParameters(SearchService.LANGUAGE_INDEX_FTS_ALFRESCO, query, false);
//params.addSort(new SortDefinition(SortDefinition.SortType.FIELD, this.statsField, false));
params.addStatsParameter(StatsParameters.PARAM_FIELD, this.statsField);
params.addStatsParameter(StatsParameters.PARAM_FACET, StatsParameters.FACET_PREFIX+propFacet.toString());

View File

@@ -123,7 +123,7 @@ public class SearchSQLApiWebscript extends AbstractWebScript implements Recogniz
public SearchParameters buildSearchParameters(SearchSQLQuery searchQuery)
{
SearchParameters sparams = new SearchParameters();
sparams.setLanguage(SearchService.LANGUAGE_SOLR_SQL);
sparams.setLanguage(SearchService.LANGUAGE_INDEX_SQL);
sparams.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
if(StringUtils.isEmpty(searchQuery.getStmt()))
{

View File

@@ -377,7 +377,7 @@ public class SearchMapperTests
try
{
searchParameters.setLanguage(SearchService.LANGUAGE_SOLR_ALFRESCO);
searchParameters.setLanguage(SearchService.LANGUAGE_INDEX_ALFRESCO);
searchMapper.fromFilterQuery(searchParameters, Arrays.asList(new FilterQuery(null, null, null)));
fail();
}