Subversion Repositories SmartDukaan

Rev

Rev 583 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 583 Rev 620
Line 131... Line 131...
131
    	
131
    	
132
    	String[] fqrys = this.request.getParameterValues("fq");
132
    	String[] fqrys = this.request.getParameterValues("fq");
133
    	
133
    	
134
    	this.crumbs = new ArrayList<String[]>();
134
    	this.crumbs = new ArrayList<String[]>();
135
    	
135
    	
136
    	/*
-
 
137
    	String strCrumb = "";
-
 
138
    	String urlCrumb = "";
-
 
139
    	if(query != null) {
-
 
140
	    	strCrumb = query;
-
 
141
	    	urlCrumb = url; 
-
 
142
	    	this.crumbs.add(new String[] { strCrumb, urlCrumb } );
-
 
143
			log.info("acrumb=" + 
-
 
144
					Arrays.toString(new String[] { strCrumb, urlCrumb }));
-
 
145
    	}else {
-
 
146
    		
-
 
147
    	}
-
 
148
    	*/
-
 
149
    	
-
 
150
    	String[] facetDefIDs = new String[] {"F_50010","F_50011","F_50002","F_50001",  "F_50006", "F_50007" };
136
    	String[] facetDefIDs = new String[] {"F_50010","F_50011","F_50002","F_50001",  "F_50006", "F_50007" };
151
    	String[] facetLabels = new String[] {"Category","Sub Category","Price",
137
    	String[] facetLabels = new String[] {"Category","Sub Category","Price",
152
    	    	"Brand", "Data Connectivity", "Camera Resolution"
138
    	    	"Brand", "Data Connectivity", "Camera Resolution"
153
        	};
139
        	};
154
    	
140
    	
Line 180... Line 166...
180
	    		log.info("acrumb=" + Arrays.toString(acrumb));
166
	    		log.info("acrumb=" + Arrays.toString(acrumb));
181
	    		this.crumbs.add(acrumb);
167
	    		this.crumbs.add(acrumb);
182
	    	}
168
	    	}
183
    	}
169
    	}
184
    	url = urlCrumb;
170
    	url = urlCrumb;
185
    	/*
-
 
186
    	if(fqrys != null) {
-
 
187
	    	log.info("fqrys=" + Arrays.toString(fqrys));
-
 
188
    		for(int i=0; i<fqrys.length; i++) {
-
 
189
	    		String facetName = StringUtils.split(fqrys[i], ":")[0];
-
 
190
	    		String facetValue = StringUtils.split(fqrys[i], ":")[1];
-
 
191
	//    		facetqueries.put(StringUtils.split(fqrys[i], ":")[0], StringUtils.split(fqrys[i], ":")[1]);
-
 
192
	    		//strCrumb += " " + facetValue;
-
 
193
	    		strCrumb =  facetValue;
-
 
194
	    		urlCrumb += "&fq=" + URLEncoder.encode(fqrys[i], "UTF-8");
-
 
195
	    		priceUrl += "&fq=" + URLEncoder.encode(fqrys[i], "UTF-8");
-
 
196
	    		String[] acrumb = new String[] { strCrumb, urlCrumb };
-
 
197
	    		log.info("acrumb=" + Arrays.toString(acrumb));
-
 
198
	    		this.crumbs.add(acrumb);
-
 
199
	    	}
-
 
200
    	}
-
 
201
    	url = urlCrumb;
-
 
202
    	*/
-
 
203
    	
-
 
204
    	/**
-
 
205
		 * FIXME facet definition ids
-
 
206
		 */
-
 
207
    	// Hard coded for now
-
 
208
//    	long[] facetDefIDs = new long[] {50001, 50003, 50004, 50005, 50006, 
-
 
209
//    			50007, 50008, 50009};
-
 
210
    	
-
 
211
    	
-
 
212
    	
-
 
213
    	/* All facets. Removing 5 of them
-
 
214
    	String[] facetDefIDs = new String[] {"Category","F_50002","F_50001", "F_50003", "F_50004", "F_50005", "F_50006", 
-
 
215
    			"F_50007", "F_50008", "F_50009"};
-
 
216
    	*/		
-
 
217
 
-
 
218
    	
-
 
219
    	/**
-
 
220
		 * FIXME facet labels
-
 
221
		 */
-
 
222
    	// Hard-coded for now
-
 
223
    	/*
-
 
224
    	String[] facetLabels = new String[] {"Category","Price",
-
 
225
    	    	"Brand", "Form Factor", "Carry In Pocket", "Cellular Technologies", 
-
 
226
    	    	"Data Connectivity", "Camera Resolution", "Built-in Memory", 
-
 
227
    	    	"Talk time"
-
 
228
        	};
-
 
229
    	*/
-
 
230
 
171
 
231
    	
172
    	
232
    	
173
    	
233
    	SolrSearchService search = new SolrSearchService(query, fqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, categoryId, sortOrder);
174
    	SolrSearchService search = new SolrSearchService(query, fqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, categoryId, sortOrder);
234
    	this.results = new LinkedHashMap<String, String[]>();
175
    	this.results = new LinkedHashMap<String, String[]>();