Subversion Repositories SmartDukaan

Rev

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

Rev 6923 Rev 6931
Line 22... Line 22...
22
import org.apache.log4j.Logger;
22
import org.apache.log4j.Logger;
23
import org.apache.struts2.convention.annotation.Result;
23
import org.apache.struts2.convention.annotation.Result;
24
import org.apache.struts2.convention.annotation.Results;
24
import org.apache.struts2.convention.annotation.Results;
25
import org.json.JSONException;
25
import org.json.JSONException;
26
 
26
 
-
 
27
import com.google.gson.Gson;
-
 
28
 
27
/**
29
/**
28
 * @author rajveer
30
 * @author rajveer
29
 *
31
 *
30
 */
32
 */
31
@Results({
33
@Results({
Line 42... Line 44...
42
	private Map<String, List<List<String>>> crumbs;
44
	private Map<String, List<List<String>>> crumbs;
43
	private List<String> tagSnippets = new ArrayList<String>();
45
	private List<String> tagSnippets = new ArrayList<String>();
44
	private String specialPageName;
46
	private String specialPageName;
45
	private String specialPageTitle;
47
	private String specialPageTitle;
46
	private String facetSelection = "";
48
	private String facetSelection = "";
-
 
49
	
-
 
50
	private Map<String, Double> dynamicSearchMap = null;
47
 
51
 
48
	private String query;
52
	private String query;
49
 
53
 
50
	private Double minPrice;
54
	private Double minPrice;
51
	private Double maxPrice;
55
	private Double maxPrice;
Line 124... Line 128...
124
    		
128
    		
125
    	String sortOrder = "F_50028+asc,F_50030+desc";
129
    	String sortOrder = "F_50028+asc,F_50030+desc";
126
    	
130
    	
127
    	SolrSearchService search = new SolrSearchService(query, fqrys, Utils.facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, 10000, sortOrder, sourceId);
131
    	SolrSearchService search = new SolrSearchService(query, fqrys, Utils.facetDefIDs, (page-1)*windowSize, windowSize, minPrice, maxPrice, 10000, sortOrder, sourceId);
128
    	this.results =  search.getResultMap(); 
132
    	this.results =  search.getResultMap(); 
129
 
-
 
-
 
133
    	this.dynamicSearchMap = search.getDynamicPriceMap();
130
    	setFacet(Arrays.asList(fqrys), search);
134
    	setFacet(Arrays.asList(fqrys), search);
131
 
135
 
132
 
136
 
133
    	Map<String, Double> priceMap = search.getPriceStatsMap();
137
    	Map<String, Double> priceMap = search.getPriceStatsMap();
134
    	if(priceMap != null){
138
    	if(priceMap != null){
Line 283... Line 287...
283
	}
287
	}
284
    
288
    
285
    public List<String> getChildren(String categoryLabel) {
289
    public List<String> getChildren(String categoryLabel) {
286
    	return SearchController.getCategoriesChildren().get(categoryLabel);
290
    	return SearchController.getCategoriesChildren().get(categoryLabel);
287
    }
291
    }
-
 
292
    
-
 
293
	public String getDynamicSearchMap(){
-
 
294
    	if (this.dynamicSearchMap == null) {
-
 
295
    		return "{}";
-
 
296
    	} else {
-
 
297
    		return new Gson().toJson(this.dynamicSearchMap);
-
 
298
    	}
-
 
299
    }
288
}
300
}