Skip Navigation

[Resolved] Search using OR not AND

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1158137

I am trying to: Allow the user to select more than 1 option. For example, if I select an option from each category, it should display any of the items below that contain that option. Such as (if parts = selection OR component category = selection OR equipments category = selection).

Link to a page where the issue can be seen: hidden link

I expected to see: The same concept will be used on hidden link If multiple jobs are posted, and someone selects Full Time & Part Time in the search query, I want a list of ALL full-time OR part-time jobs in the results..

Instead, I got: Filters based on AND condition, not OR. As mentioned above on the Job Search page, we want people to be able to select multiple options and see a list of any result that meets any of those options via an OR, not AND query.

#1158522

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please share the full screenshot of your edit view page, that will help me to review your current view settings.

#1158870
View Settings.png

Search and Pagination:

<h2>Career Center - Job Search</h2>
[wpv-filter-start hide="false"]
[wpv-filter-controls]
<label>Search</label>
<div class="form-group">
	[wpv-filter-search-box output="bootstrap"]
</div>

<div class="row">
	<div class="col-sm-4"><label>[wpml-string context="wpv-views"]Job Category[/wpml-string]</label>
	[wpv-control-postmeta field="wpcf-job-category" type="checkboxes" url_param="wpv-wpcf-job-category"]</div>
	<div class="col-sm-4"><label>[wpml-string context="wpv-views"]Job Position[/wpml-string]</label>
	[wpv-control-postmeta field="wpcf-job-position" type="checkboxes" url_param="wpv-wpcf-job-position"]</div>
	<div class="col-sm-4"><label>[wpv-control-distance default_distance="25" default_unit="mi" compare_field="business-address" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]</label></div>
</div>

[wpv-filter-submit name="Search" output="bootstrap"][wpv-filter-spinner spinner="<em><u>hidden link</u></em>"][/wpv-filter-spinner][/wpv-filter-controls]
[wpv-filter-end]
<br /><hr>
<div class="row" id="supplier-header">
	<div class="col-sm-3">Job Title</div>
	<div class="col-sm-3">Position</div>
	<div class="col-sm-3">Category</div>
	<div class="col-sm-3">Location</div>
</div>
<hr>
#1159526

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I would like to see the "Query Filter" section and the screenshot you shared does not show that section.

Could you please share access details so I can check on your install whats going wrong there.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.