|
|
|
The Id A numeric id field is not mapped (which gets indeed as a NumericField, string) still gets target by a {{NumericRangeQuery}} when using the {{ QueryBuilder }} DSL will automatically convert a query targeting the . For example:
{code} @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name= " userId", nullable=false, insertable=false, updatable=false) @DocumentId public Long getId() { return id ; } {code} qb.keyword().onField( " field into a NumericRangeQuery id") . matching(myLongId).createQuery() {code} This should only be done if The query builder needs to take the field is mapped as @NumericField, otherwise a normal keyword based metadata into account and not decide on the type of query should be generated purely based on the property type, but also whether or not it is the document id .
The A workaround is to map the field using {{ @NumericField }}.
|
|
|
|