Skip to content

All service areas from all services at location inherited when using 'keyword' search. #365

@cderenburger

Description

@cderenburger

When performing a keyword= search and setting a service_area= parameter, the results page includes all service areas for all services at a location, rather than the service area for the matching service. This behavior is not present when setting a category= parameter.

This issue is perhaps better presented with some examples.

When performing a search for "Food Pantries" the following results are given.
https://win211-web-search.herokuapp.com/locations?utf8=%E2%9C%93&keyword=Food+Pantries&service_area=Wahkiakum&location=&org_name=

keyword_search

If doing the same search but changing keyword= for category[]= the results are a correct match between the category[]= and service_area=

https://win211-web-search.herokuapp.com/locations?utf8=%E2%9C%93&category[]=Food+Pantries&service_area=Wahkiakum&location=&org_name=

category_search

"Puget Sound Labor Agency", "Lifelong", and "Northwest Harvest" all include at least one service that includes the taxonomy term "Food Pantries", but that service does not contain the service area currently selected in the example. These locations include other services which contain the service area, but not the taxonomy term.

https://win211-web-search.herokuapp.com/locations/puget-sound-labor-agency?keyword=Food+Pantries&location=&org_name=&service_area=Wahkiakum&utf8=%E2%9C%93

details

The Puget Sound Labor Agency is highlighted here as the simpler service for an example with one program the "Food Pantry" containing the taxonomy term "Food Pantries" in the service area "King" County. This service is listed in the search results for "Food Pantries" all counties/service_areas in the state because the other program "Wheelchair Ramps" contains all 39 counties in the service area.

Is there any way to have the keyword= searches return the correct services areas like category= searches?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions