opensearch-project / neural-search

Plugin that adds dense neural retrieval into the OpenSearch ecosytem
Apache License 2.0
61 stars 65 forks source link

[BUG] NeuralQueryEnricher search processor is not working with NestedQuery #813

Closed IanMenendez closed 2 months ago

IanMenendez commented 3 months ago

NeuralQueryEnricher search processor is not working with NestedQueries

how to reproduce:

PUT /_search/pipeline/test_pipeline 
{
  "request_processors": [
    {
      "neural_query_enricher" : {
        "default_model_id": "u5j0qYoBMtvQlfhaxOsa",
        "neural_field_default_id": {
           "embedding_field.knn": "uZj0qYoBMtvQlfhaYeud"
        }
      }
    }
  ]
}

GET testindex/_search?search_pipeline=test_pipeline
{
  "query": {
    "nested": {
      "score_mode": "max",
      "path": "passage_chunk_embedding",
      "query": {
        "neural": {
          "embedding_field.knn": {
            "query_text": "document"
          }
        }
      }
    }
  }
}

This should work but instead throws:

{
  "error": {
    "root_cause": [
      {
        "type": "null_pointer_exception",
        "reason": "modelId is marked non-null but is null"
      }
    ],
    "type": "null_pointer_exception",
    "reason": "modelId is marked non-null but is null"
  },
  "status": 500
}
navneet1v commented 2 months ago

@zhichao-aws where are we on fixing the bug?

zhichao-aws commented 2 months ago

@zhichao-aws where are we on fixing the bug?

it's complete