Closed
Description
Elasticsearch Version
8.18
Installed Plugins
No response
Java Version
bundled
OS Version
Problem Description
This is an issue that's only present in 8.18.
When using semantic search with lookup join, we return no results.
The issue has to do with how we detect the index names in QueryBuilderResolver
:
When using lookup join, indexNames
will hold only the right side index name.
This is not a problem for 8.x or main due to the refactor from #121260 that already fixes the issue:
Steps to Reproduce
Setup:
PUT search-movies
{
"mappings": {
"properties": {
"semantic_title": { "type": "semantic_text"},
"language": { "type": "keyword"}
}
}
}
PUT search-movies/_doc/1
{
"semantic_title": "The boy and the heron",
"language": "Japanese"
}
PUT languages
{
"settings": {
"index.mode": "lookup"
},
"mappings": {
"properties": {
"language": { "type": "keyword"},
"code": { "type": "keyword"}
}
}
}
POST languages/_doc
{
"language": "Japanese",
"code": "jp"
}
Issue a query that uses semantic search + lookup join:
POST _query
{
"query": """
FROM search-movies
| WHERE semantic_title: "bird"
| LOOKUP JOIN languages ON language
""",
"profile": true
}
we return no results.
Logs (if relevant)
No response