Subversion Repositories SmartDukaan

Rev

Rev 12106 | Rev 12132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12106 Rev 12108
Line 3... Line 3...
3
 */
3
 */
4
package in.shop2020.serving.services;
4
package in.shop2020.serving.services;
5
 
5
 
6
 
6
 
7
import in.shop2020.config.ConfigException;
7
import in.shop2020.config.ConfigException;
-
 
8
import in.shop2020.model.v1.catalog.PrivateDeal;
8
import in.shop2020.serving.controllers.SearchController;
9
import in.shop2020.serving.controllers.SearchController;
9
import in.shop2020.serving.utils.Utils;
10
import in.shop2020.serving.utils.Utils;
10
import in.shop2020.thrift.clients.config.ConfigClient;
11
import in.shop2020.thrift.clients.config.ConfigClient;
11
 
12
 
12
import java.io.UnsupportedEncodingException;
13
import java.io.UnsupportedEncodingException;
Line 145... Line 146...
145
	/**
146
	/**
146
	 * 
147
	 * 
147
	 * @param query
148
	 * @param query
148
	 * @param facetDefinitionIDs
149
	 * @param facetDefinitionIDs
149
	 */
150
	 */
150
	public SolrSearchService(String query, String[] facetqueries, long start, long rows,  Double minPrice, Double maxPrice, String sortOrder, long sourceId) {
151
	public SolrSearchService(String query, String[] facetqueries, long start, long rows,  Double minPrice, Double maxPrice, String sortOrder, long sourceId, boolean isPrivateDealUser) {
151
 
152
 
152
		this.query = query;
153
		this.query = query;
153
		
-
 
-
 
154
		this.isPrivateDealUser = isPrivateDealUser;
154
		List<String> facetsQueried = new ArrayList<String>();
155
		List<String> facetsQueried = new ArrayList<String>();
155
		if(sourceId != -1){
156
		if(sourceId != -1){
156
			priceFacetName = priceFacetName + "_" + sourceId;
157
			priceFacetName = priceFacetName + "_" + sourceId;
157
		}
158
		}
158
		
159
		
Line 684... Line 685...
684
    	String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
685
    	String[] facetDefIDs = new String[] {"Category","F_50002","F_50001",  "F_50006", "F_50007" };
685
    	//String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution"	};
686
    	//String[] facetLabels = new String[] {"Category","Price", "Brand", "Data Connectivity", "Camera Resolution"	};
686
 
687
 
687
    	
688
    	
688
    	String[] fqrys = {};
689
    	String[] fqrys = {};
689
		SolrSearchService search = new SolrSearchService("nokia", fqrys, 0 , 20, null, null, null, -1);
690
		SolrSearchService search = new SolrSearchService("nokia", fqrys, 0 , 20, null, null, null, -1, true);
690
    	
691
    	
691
    	long[] entityIDs = search.getResultEntityIDs();
692
    	long[] entityIDs = search.getResultEntityIDs();
692
    	log.info("entityIDs=" + Arrays.toString(entityIDs));
693
    	log.info("entityIDs=" + Arrays.toString(entityIDs));
693
    	
694
    	
694
    	String[] entityNames = search.getResultEntityNames();
695
    	String[] entityNames = search.getResultEntityNames();