mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Feature/search 2446 (#90)
* [SEARCH-2446] Changes for supporting ElasticSearchSearchService
This commit is contained in:
@@ -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());
|
||||
|
@@ -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()))
|
||||
{
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user