tantivy icon indicating copy to clipboard operation
tantivy copied to clipboard

Inconsistent API implementation of BytesOptions, TextOptions, and NumericOptions

Open infiniteregrets opened this issue 3 years ago • 2 comments

  • The fieldnorms function is implemented differently in the following places. https://github.com/quickwit-oss/tantivy/blob/main/src/schema/bytes_options.rs#L48

    https://github.com/quickwit-oss/tantivy/blob/main/src/schema/numeric_options.rs#L74

    https://github.com/quickwit-oss/tantivy/blob/main/src/schema/text_options.rs#L120

    The implementation for BytesOptions and TextOptions should have && self.indexed just like NumericOptions

  • Setter functions don't take a boolean argument for set_fieldnorm in NumericOptions, BytesOptions https://github.com/quickwit-oss/tantivy/blob/main/src/schema/text_options.rs#L114

    https://github.com/quickwit-oss/tantivy/blob/main/src/schema/bytes_options.rs#L77

    https://github.com/quickwit-oss/tantivy/blob/main/src/schema/numeric_options.rs#L108

infiniteregrets avatar Mar 24 '22 19:03 infiniteregrets

I will fix the inconsistencies, once someone can confirm here

infiniteregrets avatar Mar 24 '22 19:03 infiniteregrets

I will fix the inconsistencies, once someone can confirm here

Thanks for the links, yes they are inconsistent and should be fixed

PSeitz avatar Mar 29 '22 10:03 PSeitz