[opencms-dev] Lucene Search in xmlcontent special fields

Ernesto De Santis ernesto.desantis at colaborativa.net
Fri Sep 23 15:04:31 CEST 2005


CmsSearch class don't have a setFilter method, maybe a future feature?

Maybe work if you add to the free full text query this string: " 
+category:politics"

The complete example is:

String userQuery = request.getParameter("query");
String category = request.getParameter("category");
String finalQuery = userQuery + " +category:" + category;
....

Another issue that I see this days, is that CmsSearchResult don't have a 
method to get any field, only standard fields: getTitle, getDescription, 
etc. But if you want get your field "category", you can't.

Good luck.
Ernesto.


Daniel Wiesner escribió:

> hello,
>
> I have a content type news with a field "category" (politics, culture 
> ...) . Now I am looking for a way to tell lucene searching for news 
> only having the field "culture" for example.
>
> regards Daniel
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>

-- 
Ernesto De Santis - Colaborativa.net
La Plata, Argentina.
http://www.colaborativa.net/




More information about the opencms-dev mailing list