Subversion Repositories SmartDukaan

Rev

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

Rev 2435 Rev 2606
Line 75... Line 75...
75
	public SolrSearchService(String query, String[] facetqueries, String[] facetDefinitionIDs, long start, long rows,  Double minPrice, Double maxPrice, long categoryId, String sortOrder) {
75
	public SolrSearchService(String query, String[] facetqueries, String[] facetDefinitionIDs, long start, long rows,  Double minPrice, Double maxPrice, long categoryId, String sortOrder) {
76
		
76
		
77
		this.xpath = XPathFactory.newInstance().newXPath();
77
		this.xpath = XPathFactory.newInstance().newXPath();
78
		
78
		
79
    	// if multiple words are given, it should do AND for all of them
79
    	// if multiple words are given, it should do AND for all of them
-
 
80
		query = query.trim().replaceAll("\\s+", " ");
80
    	if(query.contains(" ")){
81
    	if(query.contains(" ")){
81
    		String[] tokens = query.split("\\s+");
82
    		String[] tokens = query.split("\\s+");
82
    		query = tokens[0];
83
    		query = tokens[0];
83
    		for(int i = 1; i < tokens.length; i++){
84
    		for(int i = 1; i < tokens.length; i++){
84
    			query = query + " AND " + tokens[i];
85
    			query = query + " AND " + tokens[i];
Line 177... Line 178...
177
	}
178
	}
178
}
179
}
179
 
180
 
180
*/
181
*/
181
	public HashMap<String,Integer> getFacetDetails(String facetName){
182
	public HashMap<String,Integer> getFacetDetails(String facetName){
-
 
183
		if(facetMap != null){
182
		return facetMap.get(facetName);
184
			return facetMap.get(facetName);
-
 
185
		}else{
-
 
186
			return null;
-
 
187
		}
183
	}
188
	}
184
	
189
	
185
	public TreeMap<String,HashMap<String,Integer>> getFacetMap() {
190
	public TreeMap<String,HashMap<String,Integer>> getFacetMap() {
186
		facetMap = new TreeMap<String,HashMap<String,Integer>>();
191
		facetMap = new TreeMap<String,HashMap<String,Integer>>();
187
		
192