cancel
Showing results for 
Search instead for 
Did you mean: 

Path query without Lucene (or help with Lucene path queries)

varsenault
Champ in-the-making
Champ in-the-making
Hi,

We are writing a web service client that uploads files to Alfresco.

The web client first needs to recursively check for the existence of the files' parent directories and create them if they don't exist.

Is there a way to do that without using Lucene, because we are worried that the web service client will try to update files faster than the Lucene index is updated by Alfresco. If a file in the repository is not in the Lucene index while we are trying to update it, it will result in the web service client trying to create the node again and getting a "Duplicate child name not allowed" exception.

But anyways, if Lucene is the only option, we would still need help with the query syntax. We have a file called "test" under the company home directory (the company home is called "CLIENT") . Whe have been trying the following without success :


PATH:"/app:company_home/cm:test"
PATH:"/app:company_home/test"
PATH:"/cm:GIR/cm:test"
PATH:"/GIR/test"
PATH:"//GIR/test"
PATH:"//test"
etc…

we know it doesn't work because we test the results in the following way :


queryResult.getResultSet() == null || queryResult.getResultSet().getRows() == null || queryResult.getResultSet().getRows().length < 1

and this always returns true.

Help would be very much appreciated.
2 REPLIES 2

tobias_amon
Champ in-the-making
Champ in-the-making
Hi,

it woul be helpful if you post some more sourcecode.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Check the path to the folders in the node browser.

The PATH query is avilable on commit and will also support querying against the paths of nodes not yet committed.

Andy