Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable Search Options #73

Open
andyneil opened this issue Oct 8, 2018 · 1 comment
Open

Configurable Search Options #73

andyneil opened this issue Oct 8, 2018 · 1 comment

Comments

@andyneil
Copy link

andyneil commented Oct 8, 2018

It would be good to be able to set the search options at a ListView level, mainly for text fields. This could lead onto a discussion around other data types, mainly dates where I'm sure it will quickly get more complex.
Initially the option for starts with or contains would probably be enough, but the case could be made that it should do a like out of the box, unless that's considered too expensive given you don;t know the size of the data set/fields being searched.

@mattbrailsford
Copy link
Owner

mattbrailsford commented Oct 8, 2018

Hey Andy, I'm happy to look into this as an option but yea, I'd generally stick to starts with as the default as like you say, not knowing the data in the db, likes are much more intesive than a starts with so I'd like to keep things as reserved as possible OOTB but allow someone to change that if they wish and if they understand the consequences.

I think the important thing to work out is what is the entry point for this. I think it would likely make sense to add an Enum to the AddSearchableProperty function so you can define per field. The tricky thing here is that functions like setting the name property auto set a searchable field so how do you change that if you want the name to be a like?

One option could be that you just set the global action so maybe introduce a new method SetSearchBehaviour or something which sets StartsWith or Like for all search fields.

These are just things off the top of my head, I'll have a more thurough think when I have some more spare time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants