Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch 7.10.1 - Indexing term_vector for search_as_you_type field issue #66407

Closed
chandra2037 opened this issue Dec 15, 2020 · 1 comment · Fixed by #66432
Closed

Elasticsearch 7.10.1 - Indexing term_vector for search_as_you_type field issue #66407

chandra2037 opened this issue Dec 15, 2020 · 1 comment · Fixed by #66432
Assignees
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@chandra2037
Copy link

Elasticsearch version (bin/elasticsearch --version): 7.10.1

JVM version (java -version): using a docker image

Description of the problem:

Recently upgraded Elasticsearch from V7.8.1 to V7.10.1. After the upgrade, we are getting issues in indexing the data.

Following Elasticsearch discussion post provides you more details

https://discuss.elastic.co/t/elasticsearch-7-10-1-indexing-term-vector-for-search-as-you-type-field-issue/258456

Steps to reproduce:

Copying the steps from the discussion post here

Template

 PUT _index_template/vector-test
{
    "index_patterns": ["vector-test"],
    "template": {
      "mappings": {
          "properties": {		
      	      "TestFieldName": {
      		      "type": "text",				
      		      "fields": {
      			      "suggest2": {
      				      "type": "search_as_you_type",
      				      "index_options": "offsets",
      				      "term_vector": "with_positions_offsets"
      			      }
      		      }
      	      }
          }
      }
    }  
}

Index Data

PUT /vector-test/_doc/1' 
{
    "TestFieldName" : "Test1 Field Value"
}

Error Message

  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "cannot index term vector offsets when term vectors are not indexed (field=\"TestFieldName.suggest2._index_prefix\")"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "cannot index term vector offsets when term vectors are not indexed (field=\"TestFieldName.suggest2._index_prefix\")"
  },
  "status" : 400
}

@chandra2037 chandra2037 added >bug needs:triage Requires assignment of a team area label labels Dec 15, 2020
@jimczi jimczi added :Search Foundations/Mapping Index mappings, including merging and defining field types and removed needs:triage Requires assignment of a team area label labels Dec 15, 2020
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Dec 15, 2020
@elasticmachine
Copy link
Collaborator

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

@jimczi jimczi assigned romseygeek and jimczi and unassigned romseygeek Dec 15, 2020
jimczi added a commit to jimczi/elasticsearch that referenced this issue Dec 16, 2020
This commit fixes a bug in the search_as_you_type field that was introduced during
the refactoring of the field mapper. The prefix field that is used internally
by the search_as_you_type mapper doesn't need term vector even if they are activated
on the main field. So this commit ensures that we don't copy the options from the main
field when we create the prefix sub-field.

Closes elastic#66407
jimczi added a commit that referenced this issue Dec 16, 2020
This commit fixes a bug in the search_as_you_type field that was introduced during
the refactoring of the field mapper. The prefix field that is used internally
by the search_as_you_type mapper doesn't need term vector even if they are activated
on the main field. So this commit ensures that we don't copy the options from the main
field when we create the prefix sub-field.

Closes #66407
jimczi added a commit that referenced this issue Dec 16, 2020
This commit fixes a bug in the search_as_you_type field that was introduced during
the refactoring of the field mapper. The prefix field that is used internally
by the search_as_you_type mapper doesn't need term vector even if they are activated
on the main field. So this commit ensures that we don't copy the options from the main
field when we create the prefix sub-field.

Closes #66407
jimczi added a commit that referenced this issue Dec 16, 2020
This commit fixes a bug in the search_as_you_type field that was introduced during
the refactoring of the field mapper. The prefix field that is used internally
by the search_as_you_type mapper doesn't need term vector even if they are activated
on the main field. So this commit ensures that we don't copy the options from the main
field when we create the prefix sub-field.

Closes #66407
@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants