Skip to content

When transitOnly is used, a user should be able to specify a direct mode to filter with that does not appear in the results #6591

Open
@VillePihlava

Description

@VillePihlava

Is your feature request related to a problem? Please describe.

When the StreetMode is unset, logic in the RoutingWorker sets the direct mode to WALK for filtering. The WALK mode direct search result is filtered away before returning the results to the user.

if (Boolean.TRUE.equals(modesInput.getGraphQLTransitOnly())) {
journey.direct().setMode(StreetMode.NOT_SET);
} else if (direct != null) {

request.journey().direct().setMode(emptyDirectModeHandler.resolveDirectMode());

emptyDirectModeHandler.removeWalkAllTheWayResults() ||

Instead of setting the direct mode to WALK when the direct mode is unset, it should be configurable.

Goal / high level use-case

For example, with CAR mode transit results it would be useful to filter based on the CAR direct mode. With paging the default WALK direct mode search is skipped. However, it would be useful to be able to specify a direct mode with transitOnly that does not appear in the results with paging as well. Currently only a direct + transit search with filtering is possible when using paging.

Additional context

This PR removed the default WALK direct search for filtering when used with paging: #6474

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementA functional improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions