Hi, we’re trying to do a filter_by negation on an ...
# community-help
d
Hi, we’re trying to do a filter_by negation on an array field, it only returns very few results but not all the results. Are we doing something wrong with the query? Let me know if you need any additional info from us? This is the query we’re testing. It’s a large collection and hide_for_user is empty for most. So we’re expecting 100 results give the per_page param, but it’s only returning a few.
Copy code
{
  "q": "*",
  "query_by": "full_name",
  "filter_by": "hide_for_user:!=[user3]",
  "page": 1,
  "per_page": 100,
  "exhaustive_search": true
}
k
Can you please tell me the type of hide_for_user field?
d
Copy code
}, {
        "name": "hide_for_user",
        "type": "string[]",
        "optional": True,
        "index": True,
        "facet": True
    }, {
k
Let me check and get back to you
👍 1
I just tried this on a quick sample data, but the negation filter seems to be working fine 🤔 Maybe there's an edge case that we didn't account for. Would you be able to come up with a small reproduceable example? That would help us figure out what's going wrong.
empty for most.
Actually this could be the issue. Let me try with some example with missing data.
Nope, that works fine as well. I need a small reproduceable example to investigate this.
d
what’s the best way to share this with you? could we share access to our test server or do you want sample data
k
Ideally to debug what's happening we need sample data. You can provide an export of the collection, collection schema and query.