I have had a similar issue. My solution was to change my XPATH instead of tracking down the problem.
You could try the following instead. /jcr:root/toolTest:parentTest/element(*, toolTest:contractTest)[jcr:contains(.,'" + searchText + "')] On Wed, Jan 14, 2009 at 8:33 AM, Gustavo Guevara <[email protected]>wrote: > Hi, > > I am attempting to use jackrabbit's indexing to implement full text search > for my application. I have a couple of questions: > > When adding nodes with the same name they get added a suffix like so: > > Node's path: /toolTest:parentTest/toolTest:contractTest > Node's path: /toolTest:parentTest/toolTest:contractTest[2] > Node's path: /toolTest:parentTest/toolTest:contractTest[3] > Node's path: /toolTest:parentTest/toolTest:contractTest[4] > ... > > My indexing configuration file is as follows: > > <?xml version="1.0"?> > <!DOCTYPE configuration SYSTEM " > http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd"> > <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:toolTest=" > http://localhost/toolTest" xmlns:tool="http://localhost/parentTest" > > > <index-rule nodeType="toolTest:parentTest"> </index-rule> > > <aggregate primaryType="toolTest:parentTest"> > <include primaryType="toolTest:contractTest">*</include> > </aggregate> > > <index-rule nodeType="toolTest:contractTest"> > <property>state_of_contract</property> > ...other properties... > </index-rule> > > </configuration> > > The search query I'm using is: (XPATH) > > /jcr:root/toolTest:parentTest/toolTest:contractTest[*][jcr:contains(.,'" + > searchText + "')] > > But my result set only contains information for the first node. Where am I > making a mistake? > > Thanks in advance. > -- Todd Seiber 830 Fishing Creek Rd. New Cumberland, PA 17070 h. 717-938-5778 c. 717-497-1742 e. [email protected]
