Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Concerning multiple keyword search
- This topic has 2 replies, 2 voices, and was last updated 11 years, 7 months ago by
a_humans.
-
AuthorPosts
-
November 6, 2014 at 5:11 pm #2910
a_humans
ParticipantHi,
First of all, thank you for your pluggin and please excuse my english im french !
I use your pluggin to search in a sort of “lawyer phonebook” on my WP website. I use ASP to search in different custom fields (first name, last name, address…) and catégories (languages, specialities…) at the same time.
Actually it’s possible to entry only one of those keywords in the search bar and it works.I would like to know if it’s possible to allow the user to enter multiple key word? So that ASP will display all the results containing those keywords (exclusive AND).
Example :
Today :
when i enter “isabelle” all the lawyer called isabelle display
when i enter “isabelle anglais” there is no resultsWhat i want :
when i enter “isabelle” all the lawyer called isabelle display
when i enter “isabelle anglais”, i want only the persons called “isabelle” and studied “anglais” to be displayed.
Is it possible and how ?Thanks in advance for your help,
Arnaud.November 6, 2014 at 5:51 pm #2911Ernest Marcinko
KeymasterHi!
I see what you are trying to achieve. I thought through it, looked at the code, but I see no good solution, because there are some problems:
– If the user enters the keywords in different order like “anglais isabelle”, then the search would look in the wrong fields, because there is no way to distinguish the meaning of each word for the search.
– If the user enters more keywords, then what would happen with the rest? “isabelle rose anglais” for example. The problem is almost the same, it’s hard to tell which field to look where for a program.The keyword logic is exclusive for each field, thus probably the best solution for you is to change it to “OR with exact keyword matches”. That way each word individually is compared to each field.
However the next update will have something that might solve this for you – dropdowns and radio buttons from custom fields on the settings dropdown. In your case for example you will be able to create a dropdown or radio field with languages.
November 7, 2014 at 3:15 pm #2917a_humans
ParticipantOk tank you for your answer.
I will try with “OR with exact keyword matches” and wait until the next update.Regards,
Arnaud
-
AuthorPosts
- You must be logged in to reply to this topic.