[MAGNOLIA-1217] RepositorySearchListModel.getSearchPath() not supported by QueryBuilder Created: 16/Nov/06  Updated: 18/Jul/14  Resolved: 12/May/14

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 RC4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ali Hammadi Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File QueryBuilder.patch     Text File QueryBuilder.patch    
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
Date of First Response:

 Description   

While using the method addSelect, it doesn't support the searchPath when it's defined.

ERROR info.magnolia.cms.gui.controlx.list.AbstractListModel AbstractListModel.java(getListModelIterator:80) 16.11.2006 18:16:58 can't create the list model iterator, will return an empty list
javax.jcr.query.InvalidQueryException: Encountered "jcr:path" at line 1, column 55.
Was expecting one of:
<EOF>
"OR" ...
"AND" ...
"ORDER" ...

at org.apache.jackrabbit.core.query.sql.JCRSQLQueryBuilder.createQuery(JCRSQLQueryBuilder.java:141)
at org.apache.jackrabbit.core.query.sql.QueryBuilder.createQueryTree(QueryBuilder.java:36)
at org.apache.jackrabbit.core.query.QueryParser.parse(QueryParser.java:53)
at org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(QueryImpl.java:125)
at org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(SearchIndex.java:322)
at org.apache.jackrabbit.core.query.QueryImpl.init(QueryImpl.java:92)
at org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:337)
at org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:86)
at info.magnolia.cms.core.search.QueryManagerImpl.createQuery(QueryManagerImpl.java:39)



 Comments   
Comment by Ali Hammadi [ 17/Nov/06 ]

Maybe the explanation wasn't clear. I will try to give more details.

In all searchlist function (for Website and DMS), I never found any using of the parameter "searchPath" (present in the class RespositorySearchListModel). So I tried to test it in my searchlistModel (which extends RespositorySearchListModel), it generates an InvalidQueryExpression when the query was executed because the expression which has been generated when searchPath was defined is incorrect. It misses a condition (OR, AND, ...) before the jcr:path instruction. So I think the method (addSelect in QueryBuilder class) which generate has to be patched to fix this problem.

Comment by Ali Hammadi [ 17/Nov/06 ]

Here is the patch to execute SearchQuery on a defined path

Comment by Philipp Bracher [ 17/Nov/06 ]

I will solve this by fixing the advanced search in the enterprise edition

Comment by Ali Hammadi [ 17/Nov/06 ]

Here is the patch updated. I forgot to withdraw an instruction not useful.

Generated at Mon Feb 12 03:24:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.