Skip to content

Aggregation class missing setDateHistogram and AggDateHistogram API inconsistency #24

@Eliak

Description

@Eliak

Description:

In the Manticore Search Java Client (v10.0.0), it is currently impossible to use AggDateHistogram through the standard Aggregation model due to a strict typing issue in the auto-generated code. Additionally, the AggDateHistogram class properties do not match the official documentation.

Steps to Reproduce:

Try to create an AggDateHistogram object.
Attempt to add it to an Aggregation object.
Observe that Aggregation.setHistogram() only accepts AggHistogram, and there is no setDateHistogram() method or common interface, even though they represent the same logic in the search API.

Current Behavior:

Missing Setter: The Aggregation class lacks a method to accept AggDateHistogram.
Inheritance Issue: AggDateHistogram does not inherit from AggHistogram, making it impossible to pass it to setHistogram() without unsafe casting or using Map.
API Inconsistency: Documentation suggests AggDateHistogram should support specific date-related interval strings (like "1d"), but the Java class only accepts Integer (seconds).

Expected Behavior:

Aggregation class should have a setDateHistogram() method or setHistogram() should accept a common interface/base class for both types.
AggDateHistogram properties should align with the documentation or provide clear guidance on using seconds for intervals.

Environment:

Client Version: 10.0.0
Manticore Search Version: 17.5.1+

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions