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

Ability to apply filter by metadata without affecting scoring #63

Merged
merged 9 commits into from
Apr 18, 2017

Conversation

fabito
Copy link
Contributor

@fabito fabito commented Mar 24, 2017

First if all, thanks for the library, very useful and easy to setup.

We are working on a multitenant application and we are planning to use the metadata property to add the tenant_id.
When searching for matches we need to do it in the context of a specific tenant.

The idea of this PR is to add a new (optional) filter parameter to the search_image method, so that drivers could apply it before actually trying to find matches.

A few questions:

  1. Does it make sense ? Are you interested in such a feature ?
  2. I'd like to write some tests for the ES implementation. Can anyone instruct me how do I run the integration tests ?
  3. I have no idea how to add this feature to the Mongo driver. Is it a problem ?

@fabito fabito changed the title Ability to apply filter without affecting scoring Ability to apply filter by metadata without affecting scoring Mar 27, 2017
@rhsimplex
Copy link
Owner

First of all, thank you for @fabito not only for the PR but also the test coverage 😍!!

I'm on vacation for the next week and a half, but I will try to have a look at it soon. So please be patient if you don't hear back from me for some days!

To answer your questions:

  1. Yes, this is an excellent idea for a feature, and I think others will use it.
  2. Don't worry about mongodb, I don't have test coverage for it and I don't think anyone is using it.

@rhsimplex rhsimplex merged commit ba5c739 into rhsimplex:master Apr 18, 2017
@rhsimplex
Copy link
Owner

Thanks again @fabito

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

Successfully merging this pull request may close these issues.

2 participants