You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michal Hybler <m....@email.cz> on 2007/01/18 11:42:57 UTC

Fulltext text indexing in Jackrabbit


I have a problem.Im not so sklilled in jackrabbit.
I have a cms server downloaded from jackrabbit. My configuration file
"repository.xml" is :
http://www.nabble.com/file/5696/repository.xml repository.xml 
i use this method for importing files:

public Node importFile(Node parentNode, File file) {
		Node childNode = null;
		try {
			String name = file.getName();
			childNode = parentNode.addNode(name,"nt:unstructured");
			MimeTable mt = MimeTable.getDefaultTable();
			String mimeType = mt.getContentTypeFor(file.getName());
			//create the mandatory child node - jcr:content
	        Node resNode = childNode.addNode ("jcr:content", "nt:resource");
	        resNode.setProperty ("jcr:mimeType", mimeType);
	        resNode.setProperty ("jcr:encoding", "");
	        try {
				resNode.setProperty ("jcr:data", new FileInputStream (file));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	        Calendar lastModified = Calendar.getInstance ();
	        lastModified.setTimeInMillis (file.lastModified ());
	        resNode.setProperty ("jcr:lastModified", lastModified);
			
			
			saveSession();
			
		} catch (ItemExistsException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (PathNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchNodeTypeException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (LockException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (VersionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ConstraintViolationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (RepositoryException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return childNode;
	}

In my configuration Im using patch=${rep.home}/repository/index, but i cant
find fulltect readable indexes in this folder.
I try to find text in my pdf file but function //*[jcr:contains(.,
'"+text+"')] do not find anything.
Where is problem?Why jackrabbit do not index my file?
Thanks fo help
Michal Hybler
-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8428396
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Marcel Reutegger <ma...@gmx.net>.
Michal Hybler wrote:
> could you write me all libraries i need for text indexing? thanks

There was a recent post on the dev list that explains what libraries are required:
http://www.nabble.com/Question-about-full-text-search-together-with-normal-search-tf3034103.html#a8432837


regards
  marcel

Re: Fulltext text indexing in Jackrabbit

Posted by Michal Hybler <m....@email.cz>.


Marcel Reutegger wrote:
> 
> Michal Hybler wrote:
>> problem has been solved - jackrabbit perhaps index
>> but i have other problem i have inserted pdf into jackrabbit and it
>> created
>> folder
>> its called "_2" and there is 3 files in this folder but noone is readable
>> http://www.nabble.com/file/5837/segments segments 
>> http://www.nabble.com/file/5838/deletable deletable 
>> http://www.nabble.com/file/5837/segments segments 
>>  is it allright? or there is problem with decoding?
> 
> those are the lucene index segment files. If you are interested in the
> details 
> see: http://lucene.apache.org/java/docs/fileformats.html
> 
> regards
>   marcel
> 
> 
could you write me all libraries i need for text indexing? thanks
-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8518289
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Marcel Reutegger <ma...@gmx.net>.
Michal Hybler wrote:
> problem has been solved - jackrabbit perhaps index
> but i have other problem i have inserted pdf into jackrabbit and it created
> folder
> its called "_2" and there is 3 files in this folder but noone is readable
> http://www.nabble.com/file/5837/segments segments 
> http://www.nabble.com/file/5838/deletable deletable 
> http://www.nabble.com/file/5837/segments segments 
>  is it allright? or there is problem with decoding?

those are the lucene index segment files. If you are interested in the details 
see: http://lucene.apache.org/java/docs/fileformats.html

regards
  marcel

Re: Fulltext text indexing in Jackrabbit

Posted by Michal Hybler <m....@email.cz>.
problem has been solved - jackrabbit perhaps index
but i have other problem i have inserted pdf into jackrabbit and it created
folder
its called "_2" and there is 3 files in this folder but noone is readable
http://www.nabble.com/file/5837/segments segments 
http://www.nabble.com/file/5838/deletable deletable 
http://www.nabble.com/file/5837/segments segments 
 is it allright? or there is problem with decoding?
it is same with other formats(word,xml,txt)
it looks like that search is works
-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8502962
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Michal Hybler <m....@email.cz>.
problem has been solved - jackrabbit perhaps index
but i have other problem i have inserted pdf into jackrabbit and it created
folder
its called "_2" and there is 3 files in this folder but noone is readable
http://www.nabble.com/file/5837/segments segments 
http://www.nabble.com/file/5838/deletable deletable 
http://www.nabble.com/file/5837/segments segments 
 is it allright? or there is problem with decoding?
it is same with other formats(word,xml,txt)
-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8502962
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Michal Hybler <m....@email.cz>.


Marcel Reutegger wrote:
> 
> Michal Hybler wrote:
>> I have correct this but the problem is same. There is no index folder.
>> I have tried to set:
>> <param name="path" value="${wsp.home}/index"/> 
>> but nothing changed.Can you help me?
> 
> the repository.xml file is just a template when new workspaces are
> created. Also 
> make sure you adjust any existing workspace.xml files. Or start with a
> fresh 
> repository from scratch after you changed the repository.xml.
> 
>> P.S. I have problem in eclipse: The content of element type "SearchIndex"
>> is
>> incomplete, it must macth "(param*,FileSystem)",but in the sample
>> repository.xml isnt so.
> 
> You probably have an outdated dtd. You can find the official dtds here:
> http://jackrabbit.apache.org/dtd/repository-1.0.dtd
> http://jackrabbit.apache.org/dtd/repository-1.2.dtd
> 
> 
> regards
>   marcel
> 
> 
Thanks it looks like that it sloved my problem but when i started jackrabbit
it has thrown exception:
java.lang.ClassCastException: org.apache.jackrabbit.core.query.PdfTextFilter
	at
org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:758)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.collections.BeanMap.put(BeanMap.java:367)
	at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:109)
	at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:519)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:267)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1509)
	at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:546)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:254)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:297)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:270)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:191)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
22.01.2007 14:19:14 *WARN * SearchIndex: Invalid TextFilter class:
org.apache.jackrabbit.core.query.HTMLTextFilter (SearchIndex.java, line 761)
java.lang.ClassCastException:
org.apache.jackrabbit.core.query.HTMLTextFilter
	at
org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:758)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.collections.BeanMap.put(BeanMap.java:367)
	at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:109)
	at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:519)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:267)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1509)
	at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:546)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:254)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:297)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:270)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:191)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
22.01.2007 14:19:14 *WARN * SearchIndex: Invalid TextFilter class:
org.apache.jackrabbit.core.query.XMLTextFilter (SearchIndex.java, line 761)
java.lang.ClassCastException: org.apache.jackrabbit.core.query.XMLTextFilter
	at
org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:758)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.collections.BeanMap.put(BeanMap.java:367)
	at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:109)
	at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:519)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:267)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1509)
	at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:546)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:254)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:297)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:270)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:191)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
22.01.2007 14:19:15 *WARN * SearchIndex: Invalid TextFilter class:
org.apache.jackrabbit.core.query.RTFTextFilter (SearchIndex.java, line 761)
java.lang.ClassCastException: org.apache.jackrabbit.core.query.RTFTextFilter
	at
org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:758)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.collections.BeanMap.put(BeanMap.java:367)
	at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:109)
	at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:519)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:267)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1509)
	at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:546)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:254)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:297)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:270)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:191)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
22.01.2007 14:19:15 *WARN * SearchIndex: Invalid TextFilter class:
org.apache.jackrabbit.core.query.OpenOfficeTextFilter (SearchIndex.java,
line 761)
java.lang.ClassCastException:
org.apache.jackrabbit.core.query.OpenOfficeTextFilter
	at
org.apache.jackrabbit.core.query.lucene.SearchIndex.setTextFilterClasses(SearchIndex.java:758)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.collections.BeanMap.put(BeanMap.java:367)
	at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:109)
	at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:519)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:267)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1509)
	at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:546)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:254)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:297)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:270)
	at
org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:191)
	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
have you any idea what does it mean?? maybe some libraries is missing...i
cant use maven. 
I am using only "jackrabbit-index-filters-1.1.1.jar" and "PDFBox-0.7.3.jar"
thank you for help 
Michal
-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8488594
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Marcel Reutegger <ma...@gmx.net>.
Michal Hybler wrote:
> I have correct this but the problem is same. There is no index folder.
> I have tried to set:
> <param name="path" value="${wsp.home}/index"/> 
> but nothing changed.Can you help me?

the repository.xml file is just a template when new workspaces are created. Also 
make sure you adjust any existing workspace.xml files. Or start with a fresh 
repository from scratch after you changed the repository.xml.

> P.S. I have problem in eclipse: The content of element type "SearchIndex" is
> incomplete, it must macth "(param*,FileSystem)",but in the sample
> repository.xml isnt so.

You probably have an outdated dtd. You can find the official dtds here:
http://jackrabbit.apache.org/dtd/repository-1.0.dtd
http://jackrabbit.apache.org/dtd/repository-1.2.dtd


regards
  marcel

Re: Fulltext text indexing in Jackrabbit

Posted by Michal Hybler <m....@email.cz>.
I have correct this but the problem is same. There is no index folder.
I have tried to set:
<param name="path" value="${wsp.home}/index"/> 
but nothing changed.Can you help me?
P.S. I have problem in eclipse: The content of element type "SearchIndex" is
incomplete, it must macth "(param*,FileSystem)",but in the sample
repository.xml isnt so.
Thank you for your help i am desperate.




Marcel Reutegger wrote:
> 
> There's an error in the configuration. the workspace indexes and the
> system 
> index all reference ${rep.home}/repository/index as path parameter.
> 
> The workspace indexes should rather use a path value of:
> ${wsp.home}/index
> 
> See: 
> http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/config/repository.xml
> for a valid repository configuration sample.
> 
> regards
>   marcel
> 
> Michal Hybler wrote:
>> 
>> I have a problem.Im not so sklilled in jackrabbit.
>> I have a cms server downloaded from jackrabbit. My configuration file
>> "repository.xml" is :
>> http://www.nabble.com/file/5696/repository.xml repository.xml 
>> i use this method for importing files:
>> 
>> public Node importFile(Node parentNode, File file) {
>> 		Node childNode = null;
>> 		try {
>> 			String name = file.getName();
>> 			childNode = parentNode.addNode(name,"nt:unstructured");
>> 			MimeTable mt = MimeTable.getDefaultTable();
>> 			String mimeType = mt.getContentTypeFor(file.getName());
>> 			//create the mandatory child node - jcr:content
>> 	        Node resNode = childNode.addNode ("jcr:content", "nt:resource");
>> 	        resNode.setProperty ("jcr:mimeType", mimeType);
>> 	        resNode.setProperty ("jcr:encoding", "");
>> 	        try {
>> 				resNode.setProperty ("jcr:data", new FileInputStream (file));
>> 			} catch (FileNotFoundException e) {
>> 				// TODO Auto-generated catch block
>> 				e.printStackTrace();
>> 			}
>> 	        Calendar lastModified = Calendar.getInstance ();
>> 	        lastModified.setTimeInMillis (file.lastModified ());
>> 	        resNode.setProperty ("jcr:lastModified", lastModified);
>> 			
>> 			
>> 			saveSession();
>> 			
>> 		} catch (ItemExistsException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (PathNotFoundException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (NoSuchNodeTypeException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (LockException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (VersionException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (ConstraintViolationException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		} catch (RepositoryException e) {
>> 			// TODO Auto-generated catch block
>> 			e.printStackTrace();
>> 		}
>> 		return childNode;
>> 	}
>> 
>> In my configuration Im using patch=${rep.home}/repository/index, but i
>> cant
>> find fulltect readable indexes in this folder.
>> I try to find text in my pdf file but function //*[jcr:contains(.,
>> '"+text+"')] do not find anything.
>> Where is problem?Why jackrabbit do not index my file?
>> Thanks fo help
>> Michal Hybler
> 
> 

-- 
View this message in context: http://www.nabble.com/Fulltext-text-indexing-in-Jackrabbit-tf3033407.html#a8429400
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fulltext text indexing in Jackrabbit

Posted by Marcel Reutegger <ma...@gmx.net>.
There's an error in the configuration. the workspace indexes and the system 
index all reference ${rep.home}/repository/index as path parameter.

The workspace indexes should rather use a path value of:
${wsp.home}/index

See: 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/main/config/repository.xml
for a valid repository configuration sample.

regards
  marcel

Michal Hybler wrote:
> 
> I have a problem.Im not so sklilled in jackrabbit.
> I have a cms server downloaded from jackrabbit. My configuration file
> "repository.xml" is :
> http://www.nabble.com/file/5696/repository.xml repository.xml 
> i use this method for importing files:
> 
> public Node importFile(Node parentNode, File file) {
> 		Node childNode = null;
> 		try {
> 			String name = file.getName();
> 			childNode = parentNode.addNode(name,"nt:unstructured");
> 			MimeTable mt = MimeTable.getDefaultTable();
> 			String mimeType = mt.getContentTypeFor(file.getName());
> 			//create the mandatory child node - jcr:content
> 	        Node resNode = childNode.addNode ("jcr:content", "nt:resource");
> 	        resNode.setProperty ("jcr:mimeType", mimeType);
> 	        resNode.setProperty ("jcr:encoding", "");
> 	        try {
> 				resNode.setProperty ("jcr:data", new FileInputStream (file));
> 			} catch (FileNotFoundException e) {
> 				// TODO Auto-generated catch block
> 				e.printStackTrace();
> 			}
> 	        Calendar lastModified = Calendar.getInstance ();
> 	        lastModified.setTimeInMillis (file.lastModified ());
> 	        resNode.setProperty ("jcr:lastModified", lastModified);
> 			
> 			
> 			saveSession();
> 			
> 		} catch (ItemExistsException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (PathNotFoundException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (NoSuchNodeTypeException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (LockException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (VersionException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (ConstraintViolationException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		} catch (RepositoryException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		}
> 		return childNode;
> 	}
> 
> In my configuration Im using patch=${rep.home}/repository/index, but i cant
> find fulltect readable indexes in this folder.
> I try to find text in my pdf file but function //*[jcr:contains(.,
> '"+text+"')] do not find anything.
> Where is problem?Why jackrabbit do not index my file?
> Thanks fo help
> Michal Hybler