Subversion Repositories SmartDukaan

Rev

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

Rev 569 Rev 620
Line 46... Line 46...
46
	 */
46
	 */
47
	private Map<String,String> htmlSnippets;
47
	private Map<String,String> htmlSnippets;
48
	private Map<String, String[]> results;
48
	private Map<String, String[]> results;
49
	private Map<String, String> snippets;
49
	private Map<String, String> snippets;
50
	private Map<String, List<String[]>> facets;
50
	private Map<String, List<String[]>> facets;
-
 
51
	private List<String[]> crumbs;
51
	/**
52
	/**
52
	 * 
53
	 * 
53
	 */
54
	 */
54
	private String id;
55
	private String id;
55
	
56
	
Line 112... Line 113...
112
    	
113
    	
113
    	if(fqrys!= null){
114
    	if(fqrys!= null){
114
    		length += fqrys.length;
115
    		length += fqrys.length;
115
    	}
116
    	}
116
    	
117
    	
-
 
118
    	
117
    	String[] newfqrys = new String[length];
119
    	String[] newfqrys = new String[length];
118
    	newfqrys[0] = "Category:"+categoryName;
120
    	newfqrys[0] = "Category:"+categoryName;
119
    	String urlCrumb = url;
121
    	String urlCrumb = url;
120
    	
122
    	
-
 
123
    	this.crumbs = new ArrayList<String[]>();
-
 
124
    	List<String> arrList = Arrays.asList(facetDefIDs);
121
    	for(int i=1; i<length; i++) {
125
    	for(int i=1; i<length; i++) {
122
    		newfqrys[i] = fqrys[i-1];
126
    		newfqrys[i] = fqrys[i-1];
123
    		urlCrumb += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
127
    		urlCrumb += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
124
    		priceUrl += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
128
    		priceUrl += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
-
 
129
    		String filterUrl = url;
-
 
130
    		String facetName = StringUtils.split(fqrys[i-1], ":")[0];
-
 
131
    		String facetValue = StringUtils.split(fqrys[i-1], ":")[1];
-
 
132
    		String facetLabel = facetLabels[arrList.indexOf(facetName)];
-
 
133
    		for(int j=1; j<length; j++) {
-
 
134
    			if(i==j){
-
 
135
    				continue;
-
 
136
    			}
-
 
137
    			filterUrl += "&fq=" + URLEncoder.encode(fqrys[j-1], "UTF-8");
-
 
138
	    	}
-
 
139
    		String[] acrumb = new String[] { facetLabel, facetValue, filterUrl };
-
 
140
    		log.info("acrumb=" + Arrays.toString(acrumb));
-
 
141
    		this.crumbs.add(acrumb);
-
 
142
 
125
    	}
143
    	}
126
		url = urlCrumb;
144
		url = urlCrumb;
127
    	    	
145
    	    	
128
    	if(this.request.getParameter("page") != null){
146
    	if(this.request.getParameter("page") != null){
129
    		this.page = Long.parseLong(this.request.getParameter("page"));
147
    		this.page = Long.parseLong(this.request.getParameter("page"));