Escape parenthesis’ in FT query

Had an issue today with an application that finds document using a FT search in LotusScript. The problem appeared to be quite obvious. The query was:

FIELD <fieldname> CONTAINS (<query>)
e.g.
FIELD CompanyName CONTAINS (Acme)

After looking into the problem the source of the issue turned out to be that the query string itself contained parenthesis’ which made the query be malformed due to the parenthesis’.

FIELD CompanyName CONTAINS (Acme (US))

The solution was to enclose the query string in quotes:

FIELD CompanyName CONTAINS ("Acme (US)")

Published by

lekkim

Positive, competent, out-spoken, frank and customer focused architect and developer with a strong foundation in web, cloud and product development. I'm a strong advocate for API first and cloud based solutions and development. I have a knack for being able to communicate and present technically complicated matters in conference, customer and training settings. I've previously acted as team member and leader in a product organisation.