Closed seyilonge-nci closed 4 years ago
@zhuomingao - Can you triage this please? Make sure the index will handle this, then check the query.
after changes to index mapping and loader, search contains now works as prod.
for autosuggest contain, ES query needs to be:
curl -XPOST http://SERVER_NAME/glossaryv1/terms/_search -H 'Content-Type: application/x-ndjson' -d '{
"query": {
"bool" : {
"must" :
[{"term" : { "language" : "es" }},
{"term" : { "dictionary" : "Cancer.gov" }},
{"term": { "audience": "Patient"}},
{"match_phrase":{"term_name._autocomplete":"cutáneo"}}
],
"must_not" : {"prefix" : {"term_name" : "cutáneo"}}
}
}
,"sort": ["term_name"]
, "_source": ["term_id", "term_name"]
, "from": 0
, "size": 10
}'
as in https://github.com/NCIOCPL/glossary-api/wiki/Elastic-search-Query
We're getting closer. "node biopsy" works, but searching for "cel" doesn't match production. In production, autosuggest for terms containing "cell" matches both "adoptive cell transfer" and "adult T-cell leukemia/lymphoma".
The API does not match the latter.
Sample results for current system:
"acquired pure red cell aplasia"
"adoptive cell therapy"
"adoptive cell transfer"
"adult T-cell leukemia/lymphoma"
"allogeneic stem cell transplant"
"anaplastic large cell lymphoma"
Sample results for new system:
"acquired pure red cell aplasia"
"adoptive cell therapy"
"adoptive cell transfer"
"allogeneic stem cell transplantation"
"anaplastic large cell lymphoma"
Issue description
Autosuggest and Search endpoints using contains does not return results when search string contains spaces
Steps to reproduce the issue
What's the expected result?
Should return results matching search text
What's the actual result?
Additional details / screenshot
Result from swagger
Results showing same search conducted on Cancer.gov