|
6 | 6 | import java.io.Serializable; |
7 | 7 | import java.util.Arrays; |
8 | 8 | import java.util.Collection; |
9 | | -import java.util.List; |
10 | 9 | import java.util.Map; |
11 | 10 | import java.util.Objects; |
12 | 11 | import java.util.Set; |
|
49 | 48 | import org.opentripplanner.core.model.id.FeedScopedId; |
50 | 49 | import org.opentripplanner.ext.stopconsolidation.StopConsolidationService; |
51 | 50 | import org.opentripplanner.street.geometry.WgsCoordinate; |
52 | | -import org.opentripplanner.transit.model.site.StopLocation; |
53 | | -import org.opentripplanner.transit.model.site.StopLocationsGroup; |
54 | 51 | import org.opentripplanner.transit.model.site.StopType; |
55 | 52 | import org.opentripplanner.transit.service.DefaultTransitService; |
56 | 53 | import org.opentripplanner.transit.service.TimetableRepository; |
57 | 54 | import org.opentripplanner.transit.service.TransitService; |
58 | | -import org.opentripplanner.utils.collection.ListUtils; |
59 | 55 |
|
60 | 56 | public class LuceneIndex implements Serializable { |
61 | 57 |
|
@@ -115,38 +111,6 @@ public LuceneIndex( |
115 | 111 | iwcWithSuggestField(analyzer, Set.of(SUGGEST)) |
116 | 112 | ) |
117 | 113 | ) { |
118 | | - transitService |
119 | | - .listStopLocations() |
120 | | - .stream() |
121 | | - .filter(stopLocation -> stopLocation.getStopType() == StopType.REGULAR) |
122 | | - .forEach(stopLocation -> |
123 | | - addToIndex( |
124 | | - directoryWriter, |
125 | | - StopLocation.class, |
126 | | - stopLocation.getId().toString(), |
127 | | - List.of(), |
128 | | - ListUtils.ofNullable(stopLocation.getName()), |
129 | | - ListUtils.ofNullable(stopLocation.getCode()), |
130 | | - stopLocation.getCoordinate().latitude(), |
131 | | - stopLocation.getCoordinate().longitude() |
132 | | - ) |
133 | | - ); |
134 | | - |
135 | | - transitService |
136 | | - .listStopLocationGroups() |
137 | | - .forEach(stopLocationsGroup -> |
138 | | - addToIndex( |
139 | | - directoryWriter, |
140 | | - StopLocationsGroup.class, |
141 | | - stopLocationsGroup.getId().toString(), |
142 | | - List.of(), |
143 | | - ListUtils.ofNullable(stopLocationsGroup.getName()), |
144 | | - List.of(), |
145 | | - stopLocationsGroup.getCoordinate().latitude(), |
146 | | - stopLocationsGroup.getCoordinate().longitude() |
147 | | - ) |
148 | | - ); |
149 | | - |
150 | 114 | var regularStops = transitService |
151 | 115 | .listStopLocations() |
152 | 116 | .stream() |
|
0 commit comments