You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Dave Brosius <db...@mebigfatguy.com> on 2008/03/14 20:35:12 UTC

Struggling with search

I am starting to try to get search to work.

I have my own node type definitions defined, and are derived from nt:file and nt:folder

The are (for lack of a better name)


prm:prmFile

and

prm:prmFolder

when I do this search criteria

//*[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?


Re: Struggling with search

Posted by Peter Heß <pe...@gbtec.de>.
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.


Re: Struggling with search

Posted by Marcel Reutegger <ma...@gmx.net>.
Dave Brosius wrote:
> //*[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