Skip to content

Support search_type in Rank Evaluation API#48542

Merged
cbuescher merged 4 commits intoelastic:masterfrom
cbuescher:fix-48503
Oct 29, 2019
Merged

Support search_type in Rank Evaluation API#48542
cbuescher merged 4 commits intoelastic:masterfrom
cbuescher:fix-48503

Conversation

@cbuescher
Copy link
Copy Markdown
Member

Adding support for the search_type request parameter to the Ranking Evaluation
API since this parameter can impact the ranking and the metric score and should
be choosen in the same way when evaluating the search as later in the real
search.

Closes #48503

Adding support for the `search_type` request parameter to the Ranking Evaluation
API since this parameter can impact the ranking and the metric score and should
be choosen in the same way when evaluating the search as later in the real
search.

Closes elastic#48503
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (:Search/Ranking)

Copy link
Copy Markdown
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one question.

@@ -39,12 +39,9 @@
import org.elasticsearch.tasks.Task;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't seem to be for this pr ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I pulled this out to #48523 and didn't delete it here.

* The a string representation search type to execute, defaults to {@link SearchType#DEFAULT}. Can be one of
* "dfs_query_then_fetch"/"dfsQueryThenFetch", "dfs_query_and_fetch"/"dfsQueryAndFetch", "query_then_fetch"/"queryThenFetch", and
* "query_and_fetch"/"queryAndFetch".
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed ? It should be enough to use the SearchType enum ? If not, then the comment should be changed since the types are restricted to dfs_query_then_fetch and query_then_fetch.

@cbuescher
Copy link
Copy Markdown
Member Author

@jimczi thanks for the review, I pushed some changes that should adress your comments.

@cbuescher
Copy link
Copy Markdown
Member Author

@elasticmachine update branch

// */
// public void searchType(String searchType) {
// searchType(SearchType.fromString(searchType));
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to remove ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh!

Copy link
Copy Markdown
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cbuescher
Copy link
Copy Markdown
Member Author

@elasticmachine run elasticsearch-ci/2

@cbuescher cbuescher merged commit e5646fe into elastic:master Oct 29, 2019
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Oct 29, 2019
Adding support for the `search_type` request parameter to the Ranking Evaluation
API since this parameter can impact the ranking and the metric score and should
be choosen in the same way when evaluating the search as later in the real
search.

Closes elastic#48503
cbuescher pushed a commit that referenced this pull request Oct 29, 2019
Adding support for the `search_type` request parameter to the Ranking Evaluation
API since this parameter can impact the ranking and the metric score and should
be choosen in the same way when evaluating the search as later in the real
search.

Closes #48503
@cbuescher cbuescher deleted the fix-48503 branch November 27, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support search_type in Rank Evaluation API

4 participants