Skip to content

problems building (OR)AND query with field names #20

Description

@tonymillion

I'm trying to build a query using the following code:
q = Q(Q('class','comment') | Q('class','post')) & Q('text','things')

I was expecting the output to be:
(class:(post) OR class:(comment)) text:'things'

instead I get:
(class:(comment) class:(post) AND text:(things))

Which is obviously wrong and doesn't work.


For reference a query of:
Q( Q('a')|Q('b')) & Q('text','things')

does actually output the correct query:
((a OR b) AND text:(things))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions