on 06-22-2015 2:32 PM
I added a new Attributes into my Solr.impex based on this attributes sale product should not be listed in search suggestion as well as search result, I did the following changes but unable to get expected results :--
INSERT_UPDATE SolrIndexedProperty;solrIndexedType(identifier) unique=true];name[unique=true];type(code);sortableType(code);currency[default=false];localized[default=false];multiValue[default=false];useForSpellchecking[default=false];useForAutocomplete[default=false];fieldValueProvider;valueProviderParameter
;$solrIndexedType; sale ;boolean; ; ; ; ; ; ;
And override the textSearch method Like as follows:
public class DefaultCustomSolrProductSearchService <ITEM> extends DefaultSolrProductSearchService
{
@Override
public ProductCategorySearchPageData<SolrSearchQueryData, ITEM, CategoryModel> textSearch(
String text, PageableData pageableData) {
SolrSearchQueryData searchQueryData = createSearchQueryData();
searchQueryData.setFreeTextSearch(text);
List<SolrSearchQueryTermData> searchTermList = new ArrayList<SolrSearchQueryTermData>();
SolrSearchQueryTermData searchTerm = new SolrSearchQueryTermData();
searchTerm.setKey("sale");
searchTerm.setValue(Boolean.FALSE.toString());
searchTermList.add(searchTerm);
searchQueryData.setFilterTerms(searchTermList);
return super.doSearch(searchQueryData, pageableData);
}
First you need to be sure that you can get the sale value from "http://localhost:9001/solrfacetsearch/hybris/login.jsp"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.