Thanks for the reply pawan, but that tutorial didnt explain complex queries such as joins and subquery, where results of one query will be used as an input for another. If you find any such thing please let me know. Thanks again.
I think according to Lucene search engine , even you get the search to start from particular node, But lucene search engine finds through all the project nodes internally.
So instead of writting the subquery to pick the paricular path from the nodes, its usefull to just get the node path stored in a property of a primary node and use it as a Predicategroup and use it in a QueryBuilder for your search.
Hope this helps.
I shared the url because i thought you will refer it and try to use it to accomplish your task. Anyhow couple of things which i can observe from your requirement
1. The requirement doesnt seems to be a joining requirement because you have a functional requirement to get node from property of another node and search so better do below
String nodepath=resource.getValueMap().getProperty("nodeProperty"); //get the node property using cq api
Map<String, String> map = new HashMap<String, String>();
map.put("path", nodepath); //provide the node path where you want to do full text search
map.put("group.p.or", "true"); // combine this group with OR
use remaining code from above url i provided. above code you can run for different variations even using loop. Let me know if still it doesn't fit or need more information.