So i've decided to ignore the problem that //element(*, prm:prmFile)
 just doesn't find anything, as checking the jcr:primaryType = 'prm:File' works 
fine.

My next problem is this. I have this query:

//*[jcr:primaryType = 'prm:File' and jcr:contains(jcr:content/@jcr:data, 
'sample')] order by jcr:score() descending


and it never returns anything. which i don't get.

When i change it to

//*[jcr:primaryType = 'prm:File' and jcr:content] order by jcr:score() 
descending

it returns all the files, which is what i expect.

Then i change it to

//*[jcr:primaryType = 'prm:File' and jcr:content/@jcr:data] order by 
jcr:score() descending

and again i get nothing, which seems completely wrong.

Can you not put paths in the predicate section?


-----Original Message-----
From: Peter Heß <[EMAIL PROTECTED]>
Sent: Monday, March 17, 2008 2:36pm
To: [email protected]
Subject: Re: Struggling with search


I had the same problem days before:

1.) I've first checked the repository configuration:
<Repository>
        <Workspace name="${wsp.name}">
                .....

                <SearchIndex>
                        ...
                        ...
                </SeachIndex>
        </Workspace>

        <!--
                Search index for content that is shared repository wide
                (/jcr:system tree, contains mainly versions)
        -->
        <SearchIndex
                class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
                
        </SearchIndex>   
</Repository>

You have to define SearchIndex "two times" One for the repository and one
for the workspace

2.) Then second problem:

I've have define custom nodes. It works great, with the >
//*[jcr:primaryType = 'prm:prmFile'] Query, but not with the other. Reason
was, that during the first start the registration was done, but the other
application does not know anything about the custom node registration
  1.) My own application
  2.) jcrBrowser (query had the same problem like yours) Does not know
anything about my custom nodes....

3.) And a bad usage of the mixing type leads to the same problem.

Three reasons - three times the same reaction.

Peter

> //*[jcr:primaryType = 'prm:prmFile']
> 
> if works as expected
> 
> when i do
> 
> //element(*, prm:prmFile)
> 
> nothing is returned?
> 
> I am sure i am doing something really silly, help?

hmm, the query looks OK.

did you already try to re-index the workspace? (stop repository, delete
repository/workspaces/default/index, start repository again).

regards
  marcel

-- 
View this message in context: 
http://www.nabble.com/Struggling-with-search-tp16058896p16098372.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.



Reply via email to