> Ard Schrijvers wrote: > > It may work for you at the moment, but a query like > > '//*[jcr:like(fn:lower-case(@propertyName), '%article%')]' is > > *extremely* inefficient. using the jcr:like in combination with a > > prefix '%' will most certainly lead to very slow results when the > > number of hits grows (even for quite small repositories).
> Marcel Reutegger wrote: > just a small clarification. jcr:like becomes inefficient when > the number of distinct values for the property grows. if you > only have a handful of distinct values for that property and > assign them to one million nodes the query will still be efficient. Never realized that but that makes sense. A site note for those wondering why it is like this: the behavior is not a result of the Jackrabbit implementation, but inherently part of Lucene [1] (guessing here, but I think part of any search engine based on an inverted index): 'In order to prevent extremely slow WildcardQueries, a Wildcard term should not start with one of the wildcards * or ?' [1] http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/or g/apache/lucene/search/WildcardQuery.html -Ard > > regards > marcel >
