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

Search multiple properites in object #4

Open
wfuener opened this issue May 13, 2021 · 4 comments
Open

Search multiple properites in object #4

wfuener opened this issue May 13, 2021 · 4 comments

Comments

@wfuener
Copy link

wfuener commented May 13, 2021

Is it possible to specify multiple object properties in the getter? For example, I have a list of user objects and I'm looking to do a search on the username property and name property of a user object.

@SphericalKat
Copy link
Owner

Such a usecase would require matching on both of the fields, which leads me to a dilemma on how the scoring would occur; would the final score be the aggregate of all the getter scores? Or would one take precedence over the other?

@wfuener
Copy link
Author

wfuener commented May 13, 2021

Yes that is a tricky. My thought process was that, each property would be scored separately and return object would then have the score for both separately. For sorting it could sort by either combined score or by highest property value per object and just ignore the small properties. Would do you think of that solution?

@cmenkemeller
Copy link

I'm also interested in this. Any thoughts on the proposed implementation?

For my usecase, I would propose an aggregate score, with the ability to add weights/priority to each getter.

@Hari-07
Copy link

Hari-07 commented May 31, 2024

@wfuener For a simple workaround the getter could be $username-$name and then it would do what you want

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

4 participants