cleanup
This commit is contained in:
@@ -462,13 +462,11 @@ class ProductSearchTest(TestCase):
|
||||
def test_anon_user_can_search(self):
|
||||
expected_instances = [
|
||||
self.factory(tags="lunares/blancos",description="zapatos verdes"),
|
||||
# TODO: workaround vectorized search not liking nested tags
|
||||
self.factory(tags="colores/rojos, tono/brillante"),
|
||||
# self.factory(tags="colores, rojos"),
|
||||
self.factory(tags="lunares/azules", description="zapatos rojos"),
|
||||
self.factory(tags="lunares/rojos", description="zapatos"),
|
||||
self.factory(attributes='"zapatos de campo", tono/oscuro'),
|
||||
# TODO: workaround multi-word tags
|
||||
# TODO: workaround for v3 with multi-word tags
|
||||
# self.factory(attributes='zapatos, "zapatos de campo", tono/oscuro'),
|
||||
]
|
||||
unexpected_instances = [
|
||||
|
||||
@@ -97,7 +97,7 @@ def find_related_products_v2(keyword):
|
||||
|
||||
def find_related_products_v3(keyword):
|
||||
"""
|
||||
Fully loaded product search
|
||||
Ranked product search
|
||||
|
||||
SearchVectors for the fields
|
||||
SearchQuery for the value
|
||||
|
||||
@@ -160,6 +160,7 @@ def product_search(request):
|
||||
# products_qs = find_related_products_v3(chunk)
|
||||
for instance in products_qs:
|
||||
result_set.add(instance)
|
||||
# TODO: add search for entire phrase
|
||||
|
||||
# extract filters from result_set
|
||||
filters = extract_search_filters(result_set)
|
||||
|
||||
Reference in New Issue
Block a user