Repository navigation
Conversation
10c92b8 to
c14018a
Compare
c14018a to
14c5753
Compare
|
@karussell i'm afraid we have to drop the specialized Another problem is the simple String comparison in GraphHopperStorgage.loadExisting(). We would need to skip additional properties here: I'm also a bit confused as we seem to handle EncodingManager creation from existing graphs differently for GraphHopper and GraphHopperManaged: GraphHopper(non-managed): importOrLoad() -> load() -> EncodingManager.create(EncodedValueFactory, FlagEncoderFactory, String) GraphHopperManaged: GraphHopper.init() -> GraphHopper.createEncodingManager() We can't offer any safety checks for the non-managed usecase as we have no configuration to compare to but we should probably try to unify code paths here. |
Can you describe why this is not possible? What I also would find interesting is if we could say: hey please store the values, if they are in the following list, and if not store as "other" and if missing store as "missing". Now another question for me is if we should we make strings behave like enums in custom models? Then we could write Obviously this won't work for tags where case is important like |
Currently we populate the Basically we create an EncodingManager from our configuration(read: no knowledge about values) and compare it with the String representation of the EncodingManager used while importing. If we use the approach proposed in this PR we end up with a mismatch: Graph: Config: One solution could be to move from String to Object comparison(e.g
Maybe we could add an additional filter? This wouldn't break the usecase of custom areas where we need to populate this List of the fly, as we could pass a filter which accepts all values.
A missing value should be represented as I think we could avoid String comparisons for missing values if we check for null instead.
The StringIndex looks like it's more geared towards being used a key-value store. I'm missing the ability to store multiple values for a single key. Something like this: stringIndex.add(ev.getName(), ev.getValues()); |
Stores the encoded String values as part of the toString representation of the EncodedValue in the StorableProperties.
As discussed in #2204 (comment)