[opencms-dev] AND, OR and LITERAL type search options using the JSP search functionality

Daniel Seidel d.seidel at alkacon.com
Mon Feb 20 13:22:15 CET 2017


Hi Rafael,

you can use the local query parameters, specifying the query modifier, 
i.e., {!q.op=AND}%(query). You might also consider using the modifier to 
add quotes for phrase search. This might only cause problems if someone 
enters quotes in his query.


Best, Daniel.



Am 20.02.2017 um 09:22 schrieb Cano Parra, Rafael:
>
> Dear all,
>
> I am configuring the JSP search functionality with a custom formatter.
>
> I followed the documentation and the example formatter, with good 
> results in pagination, sorting, and search content.
>
> However, I can not find how to implement a type search with three 
> options: search any word (OR option, it is the default behavior), 
> search all words (AND option), and search a literal phrase (words 
> between quotations).
>
> I found that SOLR has an option to configure AND search with local 
> parameters (i.e., using “{¡q.op=AND}” attached before the search 
> query), but I can not find the way to implement this with the JSP 
> search formatter configuration, or by code in the formatter.
>
> Also, I can not find the way to cover the search query with quotations 
> when the “search a literal phrase” option is selected, without 
> requiring the user to explicitly write the quotations in the search query.
>
> Can anyone help me, please?
>
> Best regards,
>
> *Rafael Cano Parra*
>
> Servicio de Informática
>
> Tel.: 947 52 20 13 – Ext.: 34 941
>
> rafaelcano at saludcastillayleon.es <mailto:rafaelcano at saludcastillayleon.es>
>
> *Hospital Santos Reyes*
>
> Avda. Ruperta Baraya, 6
>
> 09400 Aranda de Duero (Burgos)
>
> Tel.: 947 52 20 00 – Ext.: 34 600
>
> Fax: 947 52 20 12
>
> logo_hsry <https://www.saludcastillayleon.es/HSReyesAranda/>logo_sacyl 
> <https://www.saludcastillayleon.es/>logo_jcyl <https://www.jcyl.es/>
>
>
> --- AVISO SOBRE CONFIDENCIALIDAD. La legislación española ampara el 
> secreto de las comunicaciones. Este correo electrónico y sus anexos 
> son estrictamente confidenciales. Si Vd. no es el destinatario del 
> mismo, por favor, notifíquenoslo inmediatamente y destruya el 
> original. No deberá copiar este mensaje ni sus anexos o usarlo para 
> propósito alguno, ni divulgar su contenido a ninguna persona. ---- 
> ---- --- WARNING ABOUT CONFIDENTIALITY. Spanish law guarantees privacy 
> in electronic communications. This message and its attachments are 
> confidential. If you are not the intended recipient please, notify us 
> immediately and destroy the original. You should not copy this message 
> or use it for any purpose, nor disclose its content to any other person.
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>

-- 
Kind Regards,
Daniel.
  
-------------------

Daniel Seidel

Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170220/9148e523/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1088 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170220/9148e523/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2268 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170220/9148e523/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2161 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170220/9148e523/attachment-0001.png>


More information about the opencms-dev mailing list