I just notice that Query builder escapes special characters in values but only first one.
in debug log in XPath I see values:
'Start Off on the Left Foot\!' - when query for text with !
'Moving to Alabama\?' - when query for text with ?
But when query for test with ? and !
'Moving to Alabama? Start Off on the Left Foot\!' or 'Moving to Alabama! Start Off on the Left Foot\?'
Solved! Go to Solution.
Views
Replies
Total Likes
bartek_r wrote...
AEM 5.6.1.20130606
com.day.cq.cq-search 5.6.4
I also test Text.escapeIllegalXpathSearchChars from jackrabbit-jcr-commons 2.6.2 - 2.8 and it behave exactly same
I could not reproduce the issue. Do you have any custom index configuration done?
Views
Replies
Total Likes
which version of aem? What is bundle version of com.day.cq.cq-search?
Views
Replies
Total Likes
AEM 5.6.1.20130606
com.day.cq.cq-search 5.6.4
I also test Text.escapeIllegalXpathSearchChars from jackrabbit-jcr-commons 2.6.2 - 2.8 and it behave exactly same
Views
Replies
Total Likes
bartek_r wrote...
AEM 5.6.1.20130606
com.day.cq.cq-search 5.6.4
I also test Text.escapeIllegalXpathSearchChars from jackrabbit-jcr-commons 2.6.2 - 2.8 and it behave exactly same
I could not reproduce the issue. Do you have any custom index configuration done?
Views
Replies
Total Likes
I just write script in groovy to escape text and print it out, it is not about index but escaping characters before it go to search.
import org.apache.jackrabbit.util.Text fullText = "Moving to Alabama? Start Off on the Left Foot!"; println Text.escapeIllegalXpathSearchChars(fullText); // Moving to Alabama? Start Off on the Left Foot\! fullText = "Moving to Alabama! Start Off on the Left Foot!"; println Text.escapeIllegalXpathSearchChars(fullText); // Moving to Alabama! Start Off on the Left Foot\! fullText = "Moving to Alabama! Start Off on the Left Foot?"; println Text.escapeIllegalXpathSearchChars(fullText); // Moving to Alabama! Start Off on the Left Foot\?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies