Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query arguments are not forwarded from assets:search to document:search #223

Closed
alexandrebouthinon opened this issue Sep 21, 2022 · 0 comments
Assignees
Labels
backend bug Something isn't working

Comments

@alexandrebouthinon
Copy link
Member

Query arguments are not forwarded from assets:search to document:search. As it is, we cannot for example use the parameter lang to use Koncorde DSL in our search requests.

  async search (request: KuzzleRequest) {
    const engineId = request.getString('engineId');
    const { searchBody } = request.getSearchParams();
    const category = this.getFieldPath(request, 'category', null, 'asset-category');

    const res = await this.sdk.document.search<BaseAssetContent>(engineId, this.collection, searchBody); // Should be forwarded here using request object
    for (const hit of res.hits) {
      const document = await this.esDocumentToFormatted<BaseAssetContent>(engineId, this.collection, hit, [category]);
      this.assetCategoryService.formatDocumentMetadata(document);
    }
    return res;

  }
@alexandrebouthinon alexandrebouthinon added bug Something isn't working backend labels Sep 21, 2022
sebtiz13 added a commit that referenced this issue Sep 22, 2022
* fix(AssetController): pass options to search query
fix #223
Up the version in 2.0.0-rc23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants