Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2163 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
lis 24
10
1
srp 24
1608
1
kvě 25
1898
2
dub 24
1381
0
srp 25
1560