• Welcome to KonaKart Community Forum. Please login or sign up.
 
January 03, 2025, 03:23:16 am

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - leroyslater

1
Programming of KonaKart / Re: Product Search
February 27, 2013, 11:25:48 am
Hi

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

Thanks
Simon
2
Programming of KonaKart / Product Search
February 27, 2013, 02:45:04 am
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