Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2173 Prikazi

This piece of code is found in: website_sale/controllers/main.py line 306-307.

product_count, details, fuzzy_search_term = request.website._search_with_fuzzy("products_only", search,limit=None, order=self._get_search_order(post), options=options)

Avatar
Opusti
Best Answer

Hello Nomad_king


That piece of code assign value of  _search_with_fuzzy method's return list of search result per model fuzzy_search_term variable.


you can check method description as follow. 


"""
Performs a search with a search text or with a resembling word

:param search_type: indicates what to search within, 'all' matches all available types
:param search: text against which to match results
:param limit: maximum number of results per model type involved in the result
:param order: order on which to sort results within a model type
:param options: search options from the submitted form containing:
- allowFuzzy: boolean indicating whether the fuzzy matching must be done
- other options used by `_search_get_details()`

:return: tuple containing:
- count: total number of results across all involved models
- results: list of results per model (see _search_exact)
- fuzzy_term: similar word against which results were obtained, indicates there were
no results for the initially requested search
"""


Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
nov. 24
10
1
avg. 24
1609
1
maj 25
1901
2
apr. 24
1382
0
avg. 25
1566