Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Multiple Query parameters and Customer Properties on BulkEditor

Avatar

Level 2

Hello:

I am on 6.2 SP1 and I'm currently working with the BulkEditor and I am having a very hard time with the Query Parameters and Customer Properties fields. So I have 2 questions.

QUESTION 1 of 2: When I try to enter several parameters separated by a comma, no result is returned. But if search first with only one parameter and then with the other, then it returns them correctly. I don't seem to find any documentation to help me with this. The only one the Bulk Editor how-to page but it shows a sample with a single parameter.

Example: when I enter type:Page only it returns values; when I enter experience:XXX only, it returns values as well... when I enter them both, it fails and returns no result. To enter both parameters, I've tried all combinations I can think of:

  • type:Page, experience:XXX
  • type:Page; experience:XXX
  • type:Page and experience:XXX
  • type:Page AND experience:XXX
  • type:Page && experience:XXX

QUESTION 2 of 2: The same happens when I try to add more than one column to the results. The first one shows values, but any other after that shows in blank. The weird part is that the column is recognized and shown, but no results on it.

Screenshots for Question 1

Passing Query Parameter type

1255180_pastedImage_22.png

Passing Query Parameter experience

1255184_pastedImage_23.png

Passing both parameters

1255185_pastedImage_24.png

Screenshots for Question 2

Entering cq:lastModified as column

1255188_pastedImage_27.png

Entering experience as column

1255189_pastedImage_28.png

Entering both as columns

1255186_pastedImage_25.png

1 Accepted Solution

Avatar

Correct answer by
Level 7

Separate the properties by Space.  Here is an example where I tried 2 properties.

Screen Shot 2017-07-21 at 11.23.52 AM.png

View solution in original post

9 Replies

Avatar

Correct answer by
Level 7

Separate the properties by Space.  Here is an example where I tried 2 properties.

Screen Shot 2017-07-21 at 11.23.52 AM.png

Avatar

Level 2

Hi zeeshank15007365:

If you read my question, I mentioned that there is no reference in this article to multiple values on the Query Parameters and Custom Properties fields. So this is NOT the correct Answer. The article is NOT helpful for my question.

Avatar

Level 2

Hi viveksachdeva! Thanks for the answer!! This was really helpful and should have been marked as the correct one smacdonald2008

Do you know how to solve the second part of the question (multiple columns on the Custom Properties field)? :-)

Avatar

Level 7

No worries. I am glad it helped.. AFA columns is concerned, it needs to be comma separated as mentioned in its fieldDescription

Screen Shot 2017-08-01 at 2.51.28 PM.png

Avatar

Employee Advisor

Hi Vivek,

 

Even I am trying to use multiple query parameters in bulk editors and getting results as shown below -

DEBAL_DAS_0-1635248391714.png

I could see click on search button in bulk editor follow query has been generated in error.log file : select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [jcr:primaryType] = 'cq:PageContent' and contains([jcr:title], '\''english\''') and isdescendantnode(a, '/content/we-retail')

 

I am getting result.

DEBAL_DAS_1-1635248472123.png

 

But , I am not getting result in below scenarios -

 

DEBAL_DAS_2-1635248614169.png

DEBAL_DAS_3-1635248710108.png

 

select [jcr:path], [jcr:score], * from [cq:PageContent] as a where [jcr:primaryType] = 'cq:PageContent' and contains([jcr:createdBy], '\''admin\''') and isdescendantnode(a, '/content/we-retail') isn't providing any result.

Are there any special syntax in GQL for these properties or namespace like 'cq' ? 

Avatar

Employee Advisor

1. I have noticed bulk editor search feature generates JCR-SQL2 query to get the result and all these queries are getting generated with CONTAINS Statement only.

 

2. CONTAINS statement works perfectly with property like jcr:title, jcr:description -

    

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND CONTAINS([propertyName], "someString")


3. But CONTAINS statement doesn't work with Date property , sling:resourceType as it is pointing to path.

 

4. Though cq:lastReplicationAction is a String and but it's having very precise value such 'Activate'/'Deactivate'. As 'Contains' operator adds a wild character automatically to the search string. So, I am not getting any result.

 

5. To make sure my understanding is correct I have tested with custom property called : brand and getting result as shown below -

DEBAL_DAS_1-1635440209077.png

 

Please let me know your thoughts also.

 

Avatar

Level 2

Thanks again viveksachdeva! I was trying with a space after the comma that's why it didn't work... :-/

One more question: how can I search for nodes that are NOT something. I am trying to edit DAM nodes that are NOT JPEGs so I have a MediaType property and it works when I set it to JPEG, but don't know how to find the rest.

Note: When I search for info about the GQL query syntax for operators, complex ones (like IS NULL) include spaces and in this editor, a space means a new parameter, so I am not sure on how to use it. GQL Reference  |  Cloud Datastore Documentation  |  Google Cloud Platform

1277069_pastedImage_0.png

Avatar

Level 7

I am not sure if and how that can be done..