[MGNLPER-136] SearchResultSupplier fills logs with exceptions when user searches for string starting with slash "/" (eg path) Created: 18/Jun/20  Updated: 16/Jul/20  Resolved: 01/Jul/20

Status: Closed
Project: Periscope
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Type: Bug Priority: Neutral
Reporter: Jan Haderka Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: 1h 34m
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: Periscope improvements
Sprint: Maintenance 14
Story Points: 2

 Description   

when user enters string in a find bar that starts with slash, such as path, the search results in no results being displayed and exceptions are printed in the logs.

info.magnolia.periscope.search.SearchException: javax.jcr.query.InvalidQueryException: '/' not allowed in name

	at info.magnolia.periscope.search.jcr.JcrSearchResultSupplier.search(JcrSearchResultSupplier.java:133)
	at info.magnolia.periscope.search.jcr.JcrSearchResultSupplierTest.pathSearch(JcrSearchResultSupplierTest.java:192)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	Caused by: javax.jcr.query.InvalidQueryException: '/' not allowed in name
	at org.apache.jackrabbit.spi.commons.query.qom.QueryObjectModelFactoryImpl.checkPropertyName(QueryObjectModelFactoryImpl.java:1034)
	at org.apache.jackrabbit.spi.commons.query.qom.QueryObjectModelFactoryImpl.propertyExistence(QueryObjectModelFactoryImpl.java:481)
	at info.magnolia.periscope.search.jcr.JcrSearchResultSupplier.runQuery(JcrSearchResultSupplier.java:165)
	at info.magnolia.periscope.search.jcr.JcrSearchResultSupplier.search(JcrSearchResultSupplier.java:129)
	... 28 more


Generated at Mon Feb 12 10:29:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.