Khoros Atlas Logo

%3CLINGO-SUB%20id%3D%22lingo-sub-500747%22%20slang%3D%22en-US%22%3ESeach%20and%20%22%26amp%3B%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-500747%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20do%20I%20get%20search%20to%20pick%20up%20on%20the%20%22%26amp%3B%22%20(ampersand)%20character%20in%20article%20titles%20and%20text%3F%20The%20search%20will%20yield%20results%20on%20tags%20that%20include%20the%20%22%26amp%3B%22%20but%20not%20yield%20results%20if%20the%20ampersand%20is%20in%20the%20actual%20title%20or%20body%20of%20the%20article.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-500995%22%20slang%3D%22en-US%22%3ERe%3A%20Seach%20and%20%22%26amp%3B%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-500995%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Flithosphere.lithium.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52944%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%40kthometz%3C%2FA%3E%2C%3C%2FP%3E%3CP%3ELithium%20OOTB%20search%20works%20as%20expected.%20If%20you%20would%20like%20to%20achieve%20a%20similar%20behavior%20via%20API%2C%20then%20you%20must%20replace%20the%20special%20characters%20with%20their%20respective%20HTML%20entity%20name%20before%20search.%3C%2FP%3E%3CP%3EFor%20example%2C%20if%20your%20search%20string%20includes%20'%26amp%3B'%20as%20in%20the%20message%20title%20'Verify%26nbsp%3B%26amp%3B%20validate'%2C%20then%20your%20API%20should%20be%20something%20like%20this%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%2Frestapi%2Fvc%2Fsearch%2Fmessages%3Fq%3Dsubject%3AVerify%2B%3CSTRONG%3Eamp%3B%3C%2FSTRONG%3E%2Bvalidate%3C%2FP%3E%3CP%3EHope%20this%20helps!%3C%2FP%3E%3CP%3EThanks%2C%3CBR%20%2F%3ESrujana.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor
Contributor

Seach and "&"

How do I get search to pick up on the "&" (ampersand) character in article titles and text? The search will yield results on tags that include the "&" but not yield results if the ampersand is in the actual title or body of the article. 

Kerrie T.


0 Kudos
1 Reply 1
Honored Contributor
Honored Contributor

Re: Seach and "&"

Hi @kthometz,

Lithium OOTB search works as expected. If you would like to achieve a similar behavior via API, then you must replace the special characters with their respective HTML entity name before search.

For example, if your search string includes '&' as in the message title 'Verify & validate', then your API should be something like this - 

/restapi/vc/search/messages?q=subject:Verify+amp;+validate

Hope this helps!

Thanks,
Srujana.

Reply
Loading...