[opencms-dev] Lucene configurations for wildcard searches

Claus Priisholm cpr at codedroids.com
Thu Mar 18 08:52:39 CET 2010


I think you'll need to change the indexing such that there is a field in 
the Lucene index which stores the entire title as one term. Per default 
the title is split into multiple terms (more or less one per word).

Unless you can do something like title:"A*" (note that quotes). But as I 
remember it you cannot have wild cards in phrase queries (maybe you can 
via the API, but I take it that you use the query parser).

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

-- 
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
-- 
Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms



More information about the opencms-dev mailing list