Skip to content

Set the generalizedCostMaxLimit in next token for direct FLEX #7108

@t2gran

Description

@t2gran

Goal / high level use-case

When paging the generalizedCostMaxLimit witch is used to filter sub-sequent pages is not set for when direct is FLEX. It is only set if the direct is a street mode(foot, bike, car, ...). This force the next (and previous) page search to include transit. These results may then contain the original direct result as either access or egress, plus a back and forth transit. These looks reely bad.

Describe the solution you'd like

The paging should include the generalizedCostMaxLimit, not only for direct street results, but for direct flex results as well.

Describe alternatives you've considered

None.

Additional context

This is where the limit is set

OptionalInt minStreetCostOption = itineraries
.stream()
.filter(Itinerary::isStreetOnly)
.mapToInt(Itinerary::generalizedCost)
.min();

This is how to reproduce the problem

Frosta skole - Åsen stasjon (without page cursor)
Frosta skole - Åsen stasjon (with page cursor)

Reported by A&TB <- Entur internal link

Metadata

Metadata

Assignees

Labels

!New FeatureA functional feature targeting the end user.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions