jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Guevara <g.guev...@i-deal.hu>
Subject Re: Full text search
Date Wed, 14 Jan 2009 14:12:10 GMT
Todd Seiber wrote:
I tried using that search string as well as it's translation to SQL using

http://people.apache.org/~mreutegg/jcr-query-translator/translator.html

however the results remain the same. Any tips?
> 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 <g.guevara@i-deal.hu>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.
>>
>>     
>
>
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message