[opencms-dev] Lucene configurations for wildcard searches

Eska sven.kiesow at interone.de
Thu Mar 18 10:19:15 CET 2010


Hi Marco,

you could also define a mapping from your title-field to a property and then
use 
http://www.opencms.org/javadoc/core/org/opencms/file/CmsObject.html#readResourcesWithProperty%28java.lang.String,%20java.lang.String,%20java.lang.String,%20org.opencms.file.CmsResourceFilter%29
cmsObj.readResourcesWithProperty(...) .

For the value parameter just enter the "A". OpenCms internally converts that
into an SQL using LIKE '%A%'.

Eska


Marco Firrincieli wrote:
> 
> hi,
>  
> i'm trying to set a search inside my cmsresources whose fields "title"
> starts with the letter "A", for example.
>  
> if i just set it to "title:A*" I also get resources whose title is
> something like "Once Upon A Time In America" or "Your Advocate".
> (that is titles who contain capital A inside the title).
>  
> But I just want titles that start with capital A.
>  
> Anybody can suggest how to set a "more-fitting" lucene query?
>  
> thank so much
>  
> -Marco F.
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 

-- 
View this message in context: http://old.nabble.com/Lucene-configurations-for-wildcard-searches-tp27935330p27943202.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list