Subversion Repositories SmartDukaan

Rev

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

Rev 20214 Rev 20215
Line 42... Line 42...
42
		autoSuggestUrl.addParameter("group.field", "subCategoryId");  //group by subCategory
42
		autoSuggestUrl.addParameter("group.field", "subCategoryId");  //group by subCategory
43
		autoSuggestUrl.addParameter("group.limit", "10");             //search limit for each grouped field or query 
43
		autoSuggestUrl.addParameter("group.limit", "10");             //search limit for each grouped field or query 
44
	}
44
	}
45
 
45
 
46
	public String getSuggestions(String search_text) throws URISyntaxException, IOException{
46
	public String getSuggestions(String search_text) throws URISyntaxException, IOException{
47
		autoSuggestUrl.addParameter("q", "suggest:("+search_text+")");
47
		autoSuggestUrl.setParameter("q", "suggest:("+search_text+")");
48
		URL url = autoSuggestUrl.build().toURL();
48
		URL url = autoSuggestUrl.build().toURL();
49
		log.info("Search Url "+url.toString());
49
		log.info("Search Url "+url.toString());
50
		InputStream is = url.openStream();
50
		InputStream is = url.openStream();
51
		String jsonString;
51
		String jsonString;
52
		try{
52
		try{