chore: Index multi-properties by default - #951
Conversation
|
I think this needs to be blocked by #937. Also, it's not clear which kind of index should be created. We should discuss how this interacts with these issues, too: |
This comment was marked as outdated.
This comment was marked as outdated.
|
lets add an option to the macro to set the index type. (PropertyIndexType::FullIndex); |
This comment was marked as outdated.
This comment was marked as outdated.
RobertJacobsonCDC
left a comment
There was a problem hiding this comment.
PR #937 removed sharing indexes between properties. This PR appears to reintroduce shared properties. I don't think we want to do this. Instead, let's retain the warning and error behavior explicitly introduced in #937. I think this will simplify this PR quite a bit.
There's also the philosophical question of whether we want to expose Property::default_index_type as public API. So for example, we could add a parameter to define_*_property! / impl_*_property that lets client code set the return value of Property::default_index_type. But let's defer that question to another issue / PR. (I don't think we have a use case for it, so let's not pay the cost of added code complexity.)
|
Fixed. Equivalent multi-properties now use distinct storage; only the registered representative receives the default index. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
Not Compared (no baseline yet)
|
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
Not Compared (no baseline yet)
|
Summary
define_multi_property!create aFullIndexby default viaProperty::default_index_type.ValueCountIndexor opt outwith
PropertyIndexType::Unindexed.Property: Eq + Hashconstraint withIndexableProperty#937’s no-shared-storage design: equivalent multi-properties remaindistinct, while the first registered representative handles query routing and
is the only one eligible for a default index.
Context::index_propertycalls compatible with populatedmulti-properties, including default-indexed and unindexed definitions.
equivalent property ordering, and explicit indexing.