[SEARCH-2090]

added headers
This commit is contained in:
eliaporciani
2020-02-24 16:43:52 +01:00
parent a87c5520d6
commit b3580e0f3e
5 changed files with 53 additions and 10 deletions
@@ -1,4 +1,19 @@
import itertools
# Copyright (C) 2020 Alfresco Software Limited.
# This file is part of Alfresco
#
# 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/>.
import itertools
tokenized = "tokenized"
string = "string"
@@ -774,7 +774,6 @@ public class AlfrescoSolrDataModel implements QueryConstants
}
}
// TODO: make it better
private void addHighlightSearchFields( PropertyDefinition propertyDefinition , IndexedField indexedField)
{
@@ -999,7 +998,6 @@ public class AlfrescoSolrDataModel implements QueryConstants
}
public String getStoredContentField(QName propertyQName)
{
PropertyDefinition propertyDefinition = getPropertyDefinition(propertyQName);
@@ -1029,7 +1027,6 @@ public class AlfrescoSolrDataModel implements QueryConstants
}
/**
* Get all the field names into which we must copy the source data
*
@@ -2209,7 +2209,7 @@ public class SolrInformationServer implements InformationServer
dataModel.getIndexedFieldNamesForProperty(propertyQName).getFields()
.stream()
.filter(field -> field.getField().startsWith("text@sd___@") || field.getField().startsWith("text@m__sort"))
.filter(field -> field.getField().startsWith("text@sd___@"))
.forEach(field -> addStringProperty(valueHolder, field, value, locale));
} else
{
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2020 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* 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/>.
*/
package org.alfresco.solr;
@@ -1,3 +1,21 @@
/*
* Copyright (C) 2020 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* 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/>.
*/
package org.alfresco.solr.component;
import org.alfresco.solr.AlfrescoSolrDataModel;
@@ -39,8 +57,6 @@ public class RewriteFieldListComponent extends SearchComponent {
private void transformFieldList(SolrQueryRequest req)
{
Set<String> fieldListSet = new HashSet<>();
Set<String> defaultNonCachedFields = Set.of("id","DBID", "_version_");
@@ -84,9 +100,6 @@ public class RewriteFieldListComponent extends SearchComponent {
}
else
{
fieldListSet.addAll(solrReturnFields.getLuceneFieldNames().stream()
.map( field -> AlfrescoSolrDataModel.getInstance()
.mapStoredProperty(field, req))