how to get node path in cq5 while building a query? - aem

How to get node path in CQ5 while building a query?
I have tried the below code, but its not working
path=/data/locations/
type=stb:Location
property_1=jcr:path
property_1.value=/data/locations/berlin
p.hits=full
So, Please suggest the better way to query in AEM?
Please note that there is no property called path in node

Related

How to write a sql2 query for find the users have access to particular jcr path in AEM

i am trying to write a query for find the users who have access to particular JCR path
Also let me know the possibilities in any other.
I guess, that's not possible via JCR Query; mostly because the access control system used by Jackrabbit (by default) and AEM relies on inheritance. So the permissions a user has on a certain node is not expressed as a node or properties, but is computed out of inherited ACEs and ACEs directly attached to the node, from both groups (recursivly) and the user itself.
So, you probably need to filter your query result via session.hasPermission(). (Java)

How to avoid slash in collection name

I am using http-source, mongo channel and NGSI mongosink for fiware cygnus. I want to avoid slash(/) in the collection name in mongodb. Is it possible by changing any fields of the configuration files? Please let me know.
Thanks in advance for all the support.

cq5 not returning child pages json data on '...infinity.json' request

Even though following path http://localhost:4502/content/geometrixx/en/products.infinity.json returning folllowing json.
But same page request in my upper environments (DEV, Stage, QA boxes) returning following json
Can anyone shed some light on this ? I am trying to read child pages data for one of the component and it is working great in local but not in upper environment boxes.
Thank you!
Given that these are stage / production instances, it's possible that additional security measures were taken. If you look at the security checklist, you will see it recommends limiting number of nodes exposed by the Sling Get Servlet [0]:
https://docs.adobe.com/docs/en/aem/6-1/administer/security/security-checklist.html
So if the json.maximumresults property of the Apache Sling Get Servlet was set to 5, the page.infinity.json request won't return all the nodes in the tree.
If you have access to the instance's configuration manager (/system/console/configMgr), you can check the value of the json.maximumresults property for this servlet.
[0] https://github.com/apache/sling-org-apache-sling-servlets-get/blob/dd8af0d1d4c9666ffb16d5324a47e41ba413d973/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java#L126
The second response looks like you are hitting the jcr:content sub node directly
/content/geometrixx/en/products/jcr:content.infinity.json
The reason I say this, is that the response in your second request is the same as the graph beneath your jcr:content node in the first response.
If the request is the same, you might want to look at your resource mappings to see if something is modifying your request.

Add metric name in OTSDB via API

I am adding data into OTSDB from different sources. But i give metric name for each data points using XML file. Also i dont have any access to OTSDB to create Metric Name via terminal
I have reffered below links :-
API PUT
GitHub Issue
In gitHub issue, i couldn't understand how to use --auto-metirc .
I know how to create metric using Terminal :-
Here i am creating abxcs metirc using terminal.
./tsdb mkmetric abxcs
But How to create metric using API?
FYI :- Please suggest solution using JAVA
Thanks for help in advance.
In order to have metric names auto created on-the-fly, you'll need to set
tsd.core.auto_create_metrics = true
in the OpenTSDB configuration file. Ref: http://opentsdb.net/docs/build/html/user_guide/configuration.html
Whether or not a data point with a new metric will assign a UID to the metric. When false, a data point with a metric that is not in the database will be rejected and an exception will be thrown.
CLI equivalent of it is to pass --auto-metric switch while starting tsd process.

Naming resources prior to creation using Neo4j Restful API

This is for people with knowledge on REST and Neo4j.
Is it possible to name a node before creating it in Neo4j ?
Typical Restful thing, you create a URI "XXX/db/data/node/mynode" and you want to create a node with this identifier if it is not existent in the moment.
For all that I have been researching (and testing) to the present moment, the answer is : "no it is not possible, neo4j will just always automatically give ids to the created nodes and the attempt to do create a URI and use POST to cause its creation will result in 405"
Thanks in advance.
That's correct, you can't set the id of a node. What you can do is to add some other kind of id as a property, see create node with properties. Just make sure it's indexed automatically and then you can query that index for exact matches.