jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Restricting xpath query to document text
Date Mon, 20 Nov 2006 09:16:54 GMT
Hi Thomas,

can you please post the source of your extended NodeIndexer class? Thanks.

regards
  marcel

thomasg wrote:
> I've recently returned to finish a piece of work that was put on hold back in
> May. I've been trying to make xpath searches that are restricted to the
> content of indexed documents. I have followed the instructions in this
> thread for extending NodeIndexer. I now have 
> success running a query such as this:
> 
> //element(*, axxia:resource)[(jcr:contains(@jcr:data, 'house'))]
> 
> This query does not now return a hit if the word is in any property as this
> query would:
> //element(*, axxia:resource)[(jcr:contains(., 'house'))]
> 
> 
> 
>>>From the info posted in this thread:
> 
> "This way the jcr:data property is fulltext indexed twice, once in the 
> node scoped fulltext index (the one you can use with 
> jcr:contains(.,'whatever') ) and again in the field fulltext index, 
> which allows you to use jcr:contains(@jcr:data,'whatever'). In 
> addition the value is put a third time to the index as a whole 
> (untokenized) which allows you to use jcr:like(@jcr:date, '%foo%')"
> 
> (Guessing and hoping that @jcr:date above is typo of @jcr:data?)
> 
> I then tried wildcard queries. Wildcard searches on most properties work,
> like this:
> 
> //element(*, axxia:resource)[(jcr:like(@axxia:keywords, 'w_a_e_l'))]
> 
> I expected running this query would do a wildcard search in document content
> only:
> //element(*, axxia:resource)[(jcr:like(@jcr:data, 'comp%'))]
> 
> This query does not return an expected hit. Maybe there is an additional
> step required to enable use of @jcr:data property
> with a jcr:like constraint?
> 
> Any advice greatly appreciated.
> 
> Thanks, Thomas
> 
> 
> 


Mime
View raw message