AnsweredAssumed Answered

Simple Searching

Question asked by nyronian on May 10, 2007
Latest reply on May 10, 2007 by nyronian
I am trying to do some simple searching and I am having a hard time trying to figure out how…..

I am doing a simple search the works for a jpg in my repository:

Query query = new Query(Constants.QUERY_LANG_LUCENE, "@\\{http\\://\\}name:myimage.jpg");

this works fine but if I have mutliple "myimage.jpg" i assume it would return all references to them.  So, I would like to have a search that takes into account the space it resides in (which I know from my code).

My latest "Version" of trying to do this was:

   Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/{}company_home/{}dictionary/{}Images/{}myImage.jpg\"");        

This returns some sort of node but not the node for the image.  What would this return?  This is the path I got to the image from the Node Browser. 

I get the following properties for the node that is returned (much different when I just do the name search)

row 0: {}store-protocol = workspace
row 0: {}name = 7a9faf28-f345-11db-ab71-7fa60afd44de
row 0: {}node-dbid = 12
row 0: {}store-identifier = SpacesStore
row 0: {}node-uuid = 7a9faf28-f345-11db-ab71-7fa60afd44de
row 0: {}path = /

Do I have the wrong approach here?  If I know the exact path to the image, how do I get it?  I have spent HOURS pouring through the documentation and trying different search strings and still can't get it to work.

Thanks much….