Subversion Repositories SmartDukaan

Rev

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

Rev 786 Rev 790
Line 31... Line 31...
31
	/**
31
	/**
32
	 * 
32
	 * 
33
	 */
33
	 */
34
	private static Log log = LogFactory.getLog(SearchController.class);
34
	private static Log log = LogFactory.getLog(SearchController.class);
35
	
35
	
36
	private Map<String, String[]> results;
36
	private List<String> results;
37
 
37
 
38
	/**
38
	/**
39
	 * 
39
	 * 
40
	 */
40
	 */
41
	private Map<String, String> snippets;
41
	private Map<String, String> snippets;
Line 143... Line 143...
143
    	url = urlCrumb;
143
    	url = urlCrumb;
144
 
144
 
145
    	
145
    	
146
    	
146
    	
147
    	SolrSearchService search = new SolrSearchService(query, fqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, categoryId, sortOrder);
147
    	SolrSearchService search = new SolrSearchService(query, fqrys, facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, categoryId, sortOrder);
148
    	this.results = new LinkedHashMap<String, String[]>();
-
 
-
 
148
 
149
    	this.results =  search.getResultMap(); 
149
    	this.results =  search.getResultMap(); 
150
    	
150
    	
151
    	// Facets
151
    	// Facets
152
    	
152
    	
153
    	String qryString = this.request.getQueryString();
153
    	String qryString = this.request.getQueryString();
Line 190... Line 190...
190
 
190
 
191
 
191
 
192
    public Map<String, String> getSnippets() throws Exception {
192
    public Map<String, String> getSnippets() throws Exception {
193
    	if(results != null){
193
    	if(results != null){
194
    		snippets = new HashMap<String, String>();	
194
    		snippets = new HashMap<String, String>();	
195
	    	for(String docId: results.keySet()){
195
	    	for(String docId: results){
196
				snippets.put(docId, FileUtils.read( Utils.EXPORT_ENTITIES_PATH + docId + File.separator +"SearchSnippet.html"));
196
				snippets.put(docId, FileUtils.read( Utils.EXPORT_ENTITIES_PATH + docId + File.separator +"SearchSnippet.html"));
197
			}
197
			}
198
    	}
198
    	}
199
		return snippets;
199
		return snippets;
200
    }
200
    }
Line 210... Line 210...
210
    
210
    
211
    /**
211
    /**
212
     * 
212
     * 
213
     * @return
213
     * @return
214
     */
214
     */
215
    public Map<String, String[]> getResults() {
215
    public List<String> getResults() {
216
    	return this.results;
216
    	return this.results;
217
    }
217
    }
218
    
218
    
219
    /**
219
    /**
220
     * 
220
     *