Skip to content

[FEATURE] Hybrid query filter support in java client #1785

@AdAhAHaH

Description

@AdAhAHaH

I am trying to use the java client to create and execute a Hybrid query with a filter. This is currently supported as documented in the official release notes.

  • Issue n.1: The java client currently comes with a specific class HybridQuery but the builder does not come with a method that lets us set a filter.

To make up for the missing method, I created the query as usual, then I obtained (with the specific method) the raw json that I had to manually modify to set the filter. Then comes another huge problem:

  • Issue n.1: There is no way of executing a generic search request from a manually built json.

The java client does only permit the execution of generic requests with the method “generic().execute(genericRequest)”. This however returns a generic response object so I cannot use many of the SearchResponse methods. Also, this way I cannot specify the class the found documents should be returned as (I am reffering to the usual bi-parameter method search(searchRequest, documentClass) that i cannot use because I am forced make a generic request).

I treat this as a secondary big issue because, even after the Issue n.1 will be resolved, there could be moments in which the java client does not cover all the functionalities implemented in the latest releases. While waiting for the updates, having a generic search request that one can use, would make the users’ requests less urgent by providing a temporary fix for similar problems in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions