noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
8 stars 7 forks source link

Filtering error: The filter includes works like equal to #380

Closed d3liaa closed 10 months ago

d3liaa commented 1 year ago

Device: Desktop Operating System: Windows 11 Browser: Chrome Problem Description: The filter includesworks like equal to. When i inserted a fraction of the title in the search (Title includes "Sonvigo") in the dataset district the search had no result when it should have shown the Sonvigo/Aberstückl district. It showed th result only after i inserted the whole title, like in an equal to search. Screenshots: ss_filter_includes ss_filter_includes_2

sseppi commented 1 year ago

Hi @d3liaa ,

thank you for the information. The include operator is not like a contains operator. I try to explain you the differences here below:

The include operator checks if the element is included a certain value. Typically is used to verify if an array or list contains a certain value (eg. rawfilter=in(PublishedOn,'noi.bz.it') is the filter that returs all events that icludes in publishOn list the value "noi.bz.it"). For this reason the include operator applied on a string works like the equalTo

Unfortunately at the moment we do not have a contains filter that checks if a certain sub-string is included in a string. In case of need we can program the implementation of the contains operator, but since we already have a lot of operators, I would suggest to wait for the feedback of the users.

How would you suggest to solve this misunderstanding between the include and contains operator? Shall we document it in the documentation of the filters you are preparing?

Best Stefano

d3liaa commented 1 year ago

Hi @sseppi , Thank you for the explanation! For now, i put the difference in the documentation! A small idea: If possible i would suggest that the operators should be available only if applicable to the attribute selected. For example if i select a string include is not visible in the dropdown or if i select a boolean greater than is not visible.

gappc commented 10 months ago

See #424 for an implementation of string search

@sseppi can this issue be closed?

sseppi commented 10 months ago

Sure! Is the same functionality.