cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene query by ID

attack7
Champ in-the-making
Champ in-the-making
Hey Folks -

I'm trying to do a simple Lucene query to retrieve a piece of content via the Web Services API by ID.  I've tried two different queries…

\@{http://www.alfresco.org/model/system/1.0}node-uuid:'533112a9-2cf4-11dd-8a9c-754af8819cd2" 

Returns the right thing - a single reference to the one piece of content to which it's pointing

But surprisingly:

ID:"workspace://SpacesStore/533112a9-2cf4-11dd-8a9c-754af8819cd2"
      
Returns *two* copies of the reference.

Is there something I am doing wrong?  I assume the second approach is the more efficient way to fetch a piece of content by UUID, but I'm surprised by having 2 rows returned.

Thanks,
Matt
1 REPLY 1

sameer1sharma
Champ in-the-making
Champ in-the-making
Query query = new Query(Constants.QUERY_LANG_LUCENE,
            "+PARENT:\"workspace://SpacesStore/"+ nodes[0].getReference().getUuid() + "\"+@sys\\:node-uuid:\"" + UUID+ "\"");