faq:miscellaneous:user_search

How User Search plugin works?

User Search plugin consists of two parts: Quick Search and Advanced Search.

Quick search is aimed at providing site users a simple way of getting to search results without any restrictions. Functionality behind quick search is not attached to authentication data. Thus, quick search form doesn't know anything about searcher: both guests and logged in users are treated equally as “visitors”. Therefore quick search form, unlike advanced search, always allows any visitor to select his/her gender.

Advanced search form is aimed at providing user an ability to find users based on wider range of search criteria. Functionality behind advanced search is attached to authentication data.

  • If logged in user is doing advanced search, system automatically fetches user's gender from his profile. Therefore logged in user is not allowed to select their gender.
  • If guest user is doing advanced search, system will allow such user to select their gender, just like quick search form does.

Search logic

Both quick and advanced searches involve two parties:

  1. searcher - person who does the search.
  2. searchee - person who is being searched for.

User Search plugin is designed in a way to bring search results that meet interests of both searcher and searchee.

  • system checks which gender searcher selected for “Looking for” field.
  • system finds all users who match searchers “Looking for” value.

Outcome: raw search results.Raw search results are not yet visible to searchers and include list of potential searchees.

  • system checks what gender searchee selected for “Looking for” field in their profile.
  • system checks what is the gender of searcher.
    • * If searcher's gender meets “Looking for” value of searchee » this searchee is placed into secondary search results.
    • * If searcher's gender doesn't meet “Looking for” value of searchee » this searchee is excluded from secondary search results.

Outcome: secondary search results. Secondary search results are not visible to searchers.

  • system checks whether secondary search results meet rest of the search criteria such as age, location and anything else that was selected on search forms.

Outcome: final search results. Final search results are visible to searchers.

Example

Male user is searching for females.

Raw search results: system finds all female users

Secondary search results: system checks each found female user and fetches data about whom those female users are looking for. If female user is looking for females - this user will be excluded from search results, since searcher is male. If female user is looking for males- this user is included into secondary search results.

Final search results: system checks whether filtered female users looking for males match rest of the search criteria. Those search results are displayed to searcher.

faq/miscellaneous/user_search.txt · Last modified: 2017/06/07 09:11 by 127.0.0.1