keyword with apostrophe - API useAnswered
Hi there! I am a developer using Vault Query Language. In the API, we try to search on keywords with an apostrophe in CVs. For example: "Alzheimer's Disease". Does anyone know of a way to format our search so keywords with apostrophe's are detected via the API?
here is what we tried so far in defining the veeva query function (specifically line 5):
veeva_query_f <- function(session_id,
keyword_clean = str_replace(keyword, " ' ", "\'")
keyword_clean = str_remove_all(keyword_clean, '"')...
The FIND() clause can be used in VQL to search for keywords. If the keyword in the FIND() clause contains an apostrophe, the apostrophe needs to be escaped.
SELECT id, name__v
As for returning all keywords that contain an apostrophe through VQL, that is not supported. Partial searches can be done using a wildcard, but leading wildcards in the FIND() clause put your vault at risk for performance issues, and they are not supported from v22.3 forward.
It's also worth considering using the SCOPE option with the FIND() clause to improve search performance. With SCOPE, the search can be limited to certain areas, such as document content or a specific field.
Please sign in to leave a comment.