• Welcome to KonaKart Community Forum. Please login or sign up.
 

Product Search

Started by leroyslater, February 27, 2013, 02:45:04 am

Previous topic - Next topic

leroyslater

Hi

I am using ProductSearch object to search for products using the categoryid and searchText to define the list of products returned.  If I set a the categoryid and the search text with valid values the search results return a list of products whose search results are based on all categories not just the categoryid I specified.  It seems the categoryid is ignored and uses the default value(ProductSearch.SEARCH_ALL) if a searchtext value is specified.

Is this correct or should it only return results within that categoryid specified?

ProductSearch search = new ProductSearch();
search.setCategoryId(category_id);            
search.setSearchText(searchText);
search.setSearchTextRule(KKConstants.SEARCH_ADD_WILDCARD_BEFORE_AND_AFTER);
ProductIf[] products = kkEng.searchForProducts(null, getDataDescriptor(), search, -1).getProductArray();

Thanks
Simon

leroyslater

Hi

I have resolved this issue. I didn't include the categoryid in the beforeSendQuery in MySolrMgr.

Thanks
Simon