Closed prmr closed 10 years ago
Merged changes into master.
I had a look at the changes you made, and I have a few recommendations. Let me know if you agree with them or not.
public List<ScoredProduct> returnProductsAlphabetically(String pQueryString, String pCategoryID)
still takes a query string (pQueryString). However, the method never uses this parameter. You should probably remove the parameter from the method if it's never used.If anyone has an opinion on keeping or removing the ScoredProduct object, please let us know!
If ScoredProduct
is not used, it should indeed be removed.
I kept scored product as a wrapper around as it was being used by attribute extractor as well. Removing that will require changes to attribute extractor and its tests as well. But I can surely change that.
It would be safe to remove ScoredProduct
. All methods that use ScoredProduct
have been deprecated since we don't score attributes based on a subset of items anymore. You might only need to change the constructor calls to AttributeExtractor
to only pass the category.
Ok then. I'l remove ScoredProduct entirely. Since product search is no longer required, would it be more sensible to add the returnProductsAlphabetically method to CategorySearch directly ?
CategorySearch returns categories rather than products, and I think it would be best to keep searching and sorting separate anyways. You could put the sorting method in a new static class, and we could eventually add more methods to this class (e.g. sorting by price).
There are three failed tests in the master branch for TestProductSearch
.
18ffa552cc000ac542b968d974bc82aae2df8c0c
As of now, I have removed the failing test cases from TestProductSearch
But I have not removed the ScoredProduct
wrapper. When I attempt to remove it entirely and just return a list of products alphabetically sorted, I run into a lot of errors especially in RankedFeaturesProducts
which contain methods that are not yet deprecated. Mariam can you help me here?
When changing ScoredProduct to Product I get a lot of errors about conflicts between data.Product class and logic.search.Product class. Although they are in different packages but still eclipse is giving me errors. I'm a bit confused which one to use now, and why they have the same name?
The idea of removing ScoredProduct was to use the data.Product since ScoredProduct had no additional features/capabilities.
@mangalagb I updated RankedFeaturesProduts it now uses only Product class. I just pushed into master.
Made the following changes
1) Removed unused parameter querystring
in ProductSort
2) No more ScoredProduct
used.
Unhook the product search and rank the products alphabetically. Keep the product search code around.