Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12673

Superset Query

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Here's the use-case I am trying to solve for document level access control.

      Documents :

      [
        {"id" : "1", "users" : ["user1"]},
        {"id" : "2", "users" : ["user4"]},
        {"id" : "3", "users" : ["user1", "user2"]},
        {"id" : "4", "users" : ["user1", "user2", "user3"]},
        {"id" : "5", "users" : ["user1", "user2", "user3", "user4"]}
      ]

       

      Query : If the document has any user apart from user1, user2 or user3 don't show it.
      Results : id:1, id:3, id:4

      Query : If the document has any user apart from user1, user2 don't show it.
      Results : id:1, id:3

      I'm thinking this can be solved by writing a post-filter

      Syntax:

      {!union_has_all field=users}user1,user2,user3

      The post filter would get each document at a time and see if there is a user in that document that is not part of the query.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              varun Varun Thacker
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: