Skip to content

Conversation

@weizijun
Copy link
Contributor

When I use text_similarity_reranker, if the field is in correct, I find it return the results, but it don't rerank the result.
I don't know if the rerank work. And I find the results don't match the rerank query, it's hard to debug.
So I add the check to make sure the field exits.

@elasticsearchmachine elasticsearchmachine added v9.1.0 needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team labels Mar 13, 2025
@jimczi jimczi added :Search Relevance/Ranking Scoring, rescoring, rank evaluation. >enhancement labels Mar 14, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Mar 14, 2025
@jimczi jimczi removed the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 14, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 14, 2025
Mapper mapper;
try {
mapper = searchContext.indexShard().mapperService().mappingLookup().getMapper(field);
} catch (NullPointerException e) {
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't use this control flow like this. Why is this throwing an NPE at all? Is it because the mapper service is null or the search context isn't the correct context?

If so, please verify the search context has the required information before making the check. Otherwise, its possible that this gets false positives (e.g. something marked as missing when it actually isn't).

@benwtrent
Copy link
Member

closing, seems abandoned.

@benwtrent benwtrent closed this May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants