algolia / algolia/algoliasearch-client-dart

Unknown parameter: customRanking

Open
#8 0 comments 5 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
17
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I was trying to query using customRanking paramater

```
final SearchForHits queryHits = SearchForHits(
indexName: indexName,
query: searchText,
hitsPerPage: hitsPerPage,
page: page,
filters: filters,
attributesToRetrieve: attributesToRetrieve,
customRanking: ranking);
```

However i get a thrown error
**AlgoliaApiException{statusCode: 400, error: {"message":"Unknown parameter: customRanking","status":400}}**

The ranking is an empty array [].

When i remove the customRanking parameter, it works totally fine.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the SearchForHits entry point shown in the issue and trace how customRanking is added to the request, including the empty-array case. Reproduce the 400 response, then verify that a query using customRanking no longer sends an unsupported parameter and that queries without it still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.