Subversion Repositories SmartDukaan

Rev

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

Rev 711 Rev 790
Line 37... Line 37...
37
	private static Log log = LogFactory.getLog(CategoryController.class);
37
	private static Log log = LogFactory.getLog(CategoryController.class);
38
 
38
 
39
	/**
39
	/**
40
	 * 
40
	 * 
41
	 */
41
	 */
42
	private Map<String, String[]> results;
42
	private List<String> results;
43
	private Map<String, String> snippets;
43
	private Map<String, String> snippets;
44
	private Map<String, List<String[]>> facets;
44
	private Map<String, List<String[]>> facets;
45
	private List<String[]> crumbs;
45
	private List<String[]> crumbs;
46
	/**
46
	/**
47
	 * 
47
	 * 
Line 131... Line 131...
131
    		this.maxPrice = (new Double(this.request.getParameter("max-price")));
131
    		this.maxPrice = (new Double(this.request.getParameter("max-price")));
132
    		url= url + "&max-price=" + this.request.getParameter("max-price");
132
    		url= url + "&max-price=" + this.request.getParameter("max-price");
133
    	}    	
133
    	}    	
134
    	
134
    	
135
    	SolrSearchService search = new SolrSearchService(query, newfqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, 10000, null);
135
    	SolrSearchService search = new SolrSearchService(query, newfqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, 10000, null);
136
    	this.results = new LinkedHashMap<String, String[]>();
-
 
137
    	this.results =  search.getResultMap(); 
136
    	this.results =  search.getResultMap(); 
138
 
137
 
139
    	
138
    	
140
    	this.facets = new LinkedHashMap<String, List<String[]>>();
139
    	this.facets = new LinkedHashMap<String, List<String[]>>();
141
    	String qryString = this.request.getQueryString();
140
    	String qryString = this.request.getQueryString();
Line 213... Line 212...
213
	public String getQuery() {
212
	public String getQuery() {
214
    	return this.query;
213
    	return this.query;
215
    }
214
    }
216
    
215
    
217
    
216
    
218
    public Map<String, String[]> getResults() {
217
    public List<String> getResults() {
219
    	return this.results;
218
    	return this.results;
220
    }
219
    }
221
    
220
    
222
    public Map<String, List<String[]>> getFacets() {
221
    public Map<String, List<String[]>> getFacets() {
223
    	return this.facets;
222
    	return this.facets;
Line 262... Line 261...
262
    }
261
    }
263
 
262
 
264
    public Map<String, String> getSnippets() throws Exception {
263
    public Map<String, String> getSnippets() throws Exception {
265
    	if(results != null){
264
    	if(results != null){
266
    		snippets = new HashMap<String, String>();	
265
    		snippets = new HashMap<String, String>();	
267
	    	for(String docId: results.keySet()){
266
	    	for(String docId: results){
268
				snippets.put(docId, FileUtils.read( Utils.EXPORT_ENTITIES_PATH + docId + File.separator +"CategorySnippet.html"));
267
				snippets.put(docId, FileUtils.read( Utils.EXPORT_ENTITIES_PATH + docId + File.separator +"CategorySnippet.html"));
269
			}
268
			}
270
    	}
269
    	}
271
		return snippets;
270
		return snippets;
272
    }
271
    }