You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On these lines the existing_analysis section is checked that it exists, and is the same, as in analysis. The problem is the existing_analysis section was not properly converted back to python types, so you can get diffs such as the following:
class TestDocument(Document):
text = Text(
required=True,
fields={
"raw": Text(),
"2_3_s": Text(analyzer="2_3_shingles"),
},
)
# NOTE: You must have at least this below for your index, but change the name to something else.
class Index:
name = "test_index"
settings: Dict[str, Any] = {
"index": {
"max_ngram_diff": 2,
},
"analysis": {
"analyzer": {
"2_3_shingles": {
"tokenizer": "standard",
"filter": ["asciifolding", "2_3_shingles"],
},
},
"filter": {
"2_3_shingles": {
"type": "shingle",
"min_shingle_size": 2,
"max_shingle_size": 3,
"output_unigrams": False,
},
},
},
}
client = ...
TestDocument.init(using=client)
Then add a field to the document and try again, this will fail.
What is the expected behavior?
The existing_analysis and analysis sections should be properly deduped
What is your host/environment?
AWS
Do you have any screenshots?
Not applicable
Do you have any additional context?
None currently
The text was updated successfully, but these errors were encountered:
@dblock is there some code inside of opensearchpy that would convert the dictionary to "opensearch native" format (i.e., the format that we'd get back from the db)?
What is the bug?
On these lines the
existing_analysis
section is checked that it exists, and is the same, as inanalysis
. The problem is theexisting_analysis
section was not properly converted back to python types, so you can get diffs such as the following:These should obviously match, but they don't.
How can one reproduce the bug?
Create an index with an analysis section (e.g.,:
Then add a field to the document and try again, this will fail.
What is the expected behavior?
The
existing_analysis
andanalysis
sections should be properly dedupedWhat is your host/environment?
AWS
Do you have any screenshots?
Not applicable
Do you have any additional context?
None currently
The text was updated successfully, but these errors were encountered: