[Geoserver-devel] Proposal for adding exact term search to search text-boxes

Hello, GeoServer Community.

I am writing to propose a modification to the GeoServer web interface that I believe would enhance the user experience and improve usability.

The goal is to extend the search functionality within GeoServer pages by introducing a specific feature that could help to better search for elements with the textual search box.

Background:

Currently, the search functionality lacks the capability to find specific words. Its full-text fashion simply returns any word that contains the search term. For example, if a user searches for layers named “gis”, he may get results like gis_store and registered because the search term appears within both words.

Proposal Overview:

My proposal consists in expanding the syntax that the search box recognizes, adding the possibility to have an exact term search just quoting the word.

Follows a visual example in the screenshots below.

The full-text search has returned two layers as the results of the query arch.

As you can see, in the returned layers not only the actual arch layer is present, but also the archive one, since the latter contains the searched word in its name.

Here is an example showing the new functionality, where the search has been made for an exact term, quoting the word: “arch”.

As a result, only the arch layer is displayed.

Impact and Benefits:

These changes would not affect the default search functionality, that would be still made on all the text attributes of the searched element (layer, workspace, style, etc.).

Additionally, users can combine full-text search with exact term search to create more complex queries, such as: “history” “gis” arch (all elements containing in their text fields the word history or all elements containing in their text fields the word gis or all elements containing in their text fields a word that contains arch).

Implementation Plan:

The changes needed to implement this functionality should be limited to the GeoServerDataProvider classes. Additionally, a tooltip explaining the new syntax next to the search box would be beneficial for users.

I am eager to hear your thoughts and feedback on this proposal.

Please feel free to share any concerns, suggestions, or alternative approaches that you believe should be considered.

Best regards,

Alessandro Ricchiuti

Professional Support for GeoNode, GeoServer and MapStore from the experts!
Visit http://bit.ly/gs-services for more information.

Alessandro Ricchiuti
Software Engineer

GeoSolutions Group
phone: +39 0584 962313
fax: +39 0584 1660272

https://www.geosolutionsgroup.com
https://twitter.com/geosolutions_it


This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

That looks fun, +1

I considered if it could be more easily discoverable if a space separator was used; but the result was less clear.

···

Jody Garnett

Alessandro,

If you are happy with your proposal (it seems clear) could you admit is as a page to the wiki: https://github.com/geoserver/geoserver/wiki/Proposals

There is a template to cut and paste (see developer guide for details).

···


Jody Garnett

I think Alessandro used “propose” in loose terms, without necessarily meaning GSIP.
Do you believe it’s a GSIP worthy change? It seems mostly transparent to the current usage.

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail


Jody Garnett

I was just checking in,

I am sure it would be fine as an improvement in the bug tracker.

I had considered avoiding double quotes, and just using white space separators (with the idea that would be easier for users to discover as it would occur naturally while typing).

‘foo’ → foo
'foo ’ → (\s|^)foo(\s|$)

‘foo bar’ → (\s|^)(foo|bar)+(\s|$)

···


Jody Garnett

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail


Jody Garnett

Hi Jody,
using spaces looks … less natural to me. Force of habit I guess, if I have to search for an exact word or multiple exact words
in Google, I use double quotes there as well.

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail


Jody Garnett

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail


Jody Garnett