-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Addressbook API and more #929
base: develop
Are you sure you want to change the base?
Conversation
5c4a6b8
to
9b88bd6
Compare
recoco/rest_api/filters.py
Outdated
class WatsonSearchFilter(BaseSearchFilter): | ||
def filter_queryset(self, request, queryset, view): | ||
search_terms = " ".join(self.get_search_terms(request)) | ||
return ( | ||
watson_search.filter(queryset, search_text=search_terms) | ||
.annotate(search_rank=F("watson_rank")) | ||
.filter(search_rank__gte=self.get_search_min_rank(view, request)) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca fonctionne avec watson, mais pour le moment je ne sais pas faire:
- booster des champs les uns par rapport aux autres
- ajouter une config "french"
else: | ||
search_vector += _vector | ||
|
||
search_query = SearchQuery(search_terms, config="french") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca serait pas mal d'avoir une config french sans accent.
Ex: https://stackoverflow.com/questions/47230566/using-unaccent-with-searchvector-and-searchquery-in-django
0ac21aa
to
934befd
Compare
1523612
to
ec58903
Compare
c8e796b
to
07fda9a
Compare
recoco/rest_api/permissions.py
Outdated
from recoco.utils import is_staff_for_site | ||
|
||
|
||
class IsStaff(BasePermission): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça pourrait être pas mal de l'appeler IsStaffForSite pour éviter les confusion avec Staff Recoco
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
|
||
|
||
class VectorSearchFilter(BaseSearchFilter): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrais tu documenter en quelques mots ce que ça fait stp ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
Il s'agit de :
Décrivez vos changements
OrganizationGroup
TaskFollowup
et modification des payload liésNotes:
Checklist d'acceptation de revue de code
Demandes