Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

suggest is not a SuggestField #227

Closed
paintmeyellow opened this issue Sep 16, 2020 · 4 comments
Closed

suggest is not a SuggestField #227

paintmeyellow opened this issue Sep 16, 2020 · 4 comments
Assignees
Labels
bug Issue that exposes a bug question Further information is requested

Comments

@paintmeyellow
Copy link

paintmeyellow commented Sep 16, 2020

Why when I am using "index.knn = true" I got error suggest is not a SuggestField?

Here is the mapping of suggest field:

"suggest": {
    "type": "completion",
    "analyzer": "simple",
    "preserve_separators": true,
    "preserve_position_increments": false,
    "max_input_length": 50
}

Here is the problem part of query:

"suggest": {
    "prefix_suggest": {
        "text": "white",
        "completion": {
            "field": "suggest"
        }
    }
}
@vamshin vamshin self-assigned this Sep 17, 2020
@vamshin
Copy link
Member

vamshin commented Sep 18, 2020

Hi @Nikitos096,

Could you please provide the complete index mapping and the query to reproduce at our end?

@paintmeyellow
Copy link
Author

Hi @Nikitos096,

Could you please provide the complete index mapping and the query to reproduce at our end?

Yep, here you go:

PUT music
{
  "settings": {
    "index": {
      "knn": true
    }
  }, 
  "mappings": {
    "properties": {
      "suggest": {
        "type": "completion"
      }
    }
  }
}

PUT music/_doc/1?refresh
{
  "suggest" : {
    "input": [ "Nevermind", "Nirvana" ],
    "weight" : 34
  }
}

POST music/_search?pretty
{
  "suggest": {
    "song-suggest": {
      "prefix": "nir",        
      "completion": {         
          "field": "suggest"  
      }
    }
  }
}

Source: https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-suggesters.html#completion-suggester

@vamshin
Copy link
Member

vamshin commented Sep 21, 2020

Looks like KNNCodec is missing this implementation. Will dig into this and update the thread soon.

@vamshin vamshin added question Further information is requested bug Issue that exposes a bug labels Sep 21, 2020
@vamshin
Copy link
Member

vamshin commented Sep 24, 2020

We are considering this as a bug and we would prioritize the fix accordingly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue that exposes a bug question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants