I was working on a project involving Search server and building a search query according to user input, I had stumbled upon a weird bug in the LIKE statement, which caused the query to miss out on relevant data. simply put, the like statement will fail on long strings, I was trying to compare some long pipe concatenated metadata as follows “|item a|item b|…” the LIKE statement would work for item A but for items further along the line it failed silently, not returning results. i counted to the threshold, it was 64 characters. that was odd. searching this issue returned nothing (like is a difficult search term) so I solved the problem with plan B and carried on.
Today i came across a post stating that this in fact is a known limitation, known to who you might ask?
Well, to Steve Curran MVP which cleverly disclose :
"Yes this is a known limitation. You should avoid using the LIKE predicate in FullTextSQL and use the CONTAINS predicate. It works very well with the Path managed property. In you case just do CONTAINS(Path,’http://servername/sitename/listname/folder’)."
Thank you Steve.
Indeed using a CONTAINS statement will solve the problem and will not (in my specific case) impact rank.
If you read this, HTH.