Hey Perch Community,
I have 3 search functions on a members landing page. One field states to search by "Name", the other "Country", and the last field by "Area of Expertise". I notice when you search, Perch will find an instance of the search item, but not the entire search string.
Example: Searching by "Area of Expertise" with the value "Pediatric Oncology".
This search will pull up multiple profiles with some containing "Pediatric" and some others only containing "Oncology" but not profiles containing only "Pediatric Oncology".
What am I doing wrong?
Here is the search code
- <perch:form id="search" method="get">
- <div id="name">
- <perch:input type="search" id="m" placeholder="Search by name..."/>
- <perch:input type="submit" value="Search" />
- </div>
- <div id="country">
- <perch:input type="select" id="c" placeholder="Search by country..." options="United States of America, Afghanistan, Albania, Algeria, Andorra, Angola, Antigua & Deps, Argentina, Armenia, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bhutan, Bolivia, Bosnia Herzegovina, Botswana, Brazil, Brunei, Bulgaria, Burkina, Burma, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Central African Rep, Chad, Chile, People's Republic of China, Republic of China, Colombia, Comoros, Democratic Republic of the Congo, Republic of the Congo, Costa Rica, Croatia, Cuba, Cyprus, Czech Republic, Danzig, Denmark, Djibouti, Dominica, Dominican Republic, East Timor, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Fiji, Finland, France, Gabon, Gaza Strip, The Gambia, Georgia, Germany, Ghana, Greece, Grenada, Guatemala, Guinea, Guinea-Bissau, Guyana, Haiti, Holy Roman Empire, Honduras, Hungary, Iceland, India, Indonesia, Iran, Iraq, Republic of Ireland, Israel, Italy, Ivory Coast, Jamaica, Japan, Jonathanland, Jordan, Kazakhstan, Kenya, Kiribati, North Korea, South Korea, Kosovo, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macedonia, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Mauritania, Mauritius, Mexico, Micronesia, Moldova, Monaco, Mongolia, Montenegro, Morocco, Mount Athos, Mozambique, Namibia, Nauru, Nepal, Newfoundland, Netherlands, New Zealand, Nicaragua, Niger, Nigeria, Norway, Oman, Ottoman Empire, Pakistan, Palau, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Prussia, Qatar, Romania, Rome, Russian Federation, Rwanda, St Kitts & Nevis, St Lucia, Saint Vincent & the, Grenadines, Samoa, San Marino, Sao Tome & Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Slovakia, Slovenia, Solomon Islands, Somalia, South Africa, Spain, Sri Lanka, Sudan, Suriname, Swaziland, Sweden, Switzerland, Syria, Tajikistan, Tanzania, Thailand, Togo, Tonga, Trinidad & Tobago, Tunisia, Turkey, Turkmenistan, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, Uruguay, Uzbekistan, Vanuatu, Vatican City, Venezuela, Vietnam, Yemen, Zambia, Zimbabwe"/>
- <perch:input type="submit" value="Search" />
- </div>
- <div id="area">
- <perch:input type="select" id="a" placeholder="Search by expertise..." options="Clinical Research, Epidemiology, Systematic Review, Guideline Development, Oral Mucositis, Bone Health, Oral Care, Pediatric Oncology, Geriatric Oncology, Patient Education, Professional Education, Social Media, Collaborations, Web Applications, Supportive Care, Quality of Life, Genomics, Other Oral Toxicities, Oral Rehabilitiation, Other"/>
- <perch:input type="submit" value="Search" />
- </div>
- </perch:form>
Display More
Here is the results code
- <div id="results-member">
- <?php $query = perch_get('m');
- perch_content_search($query, array(
- 'count'=> 10,
- 'from-Path'=> '/members',
- 'template'=> 'member-result.html',
- 'excerpt-chars'=> 144,
- 'hide-default-doc'=> false,
- 'sort' => 'name',
- 'sort-order' => 'ASC',
- ));
- ?>
- </div>
- <div id="results-country">
- <?php $query = perch_get('c');
- perch_content_search($query, array(
- 'count'=> 10,
- 'from-Path'=> '/members',
- 'template'=> 'country-result.html',
- 'excerpt-chars'=> 144,
- 'hide-default-doc'=> false,
- 'sort' => 'name',
- 'sort-order' => 'ASC',
- ));
- ?>
- </div>
- <div id="results-area">
- <?php $query = perch_get('a');
- perch_content_search($query, array(
- 'count'=> 10,
- 'from-Path'=> '/members',
- 'template'=> 'area-result.html',
- 'excerpt-chars'=> 144,
- 'hide-default-doc'=> false,
- 'sort' => 'name',
- 'sort-order' => 'ASC',
- ));
- ?>
- </div>
Display More
Any help on the matter would be greatly appreciated.
Cheers, Matt
