Skip to content

How To: execute complex searches #224

@MR4online

Description

@MR4online

Hi there,

is there a way to execute some more complex search queries?

Examples:

  1. FIND album WHERE year = 1990 OR year IS NULL (or undefined)
    [EDIT: this will not work at all (redis search limitation)]

  2. FIND album WHERE (year = 1990 OR year = 2000) AND foo = "bar

  3. FIND album WHERE year = 1990 OR (year = 2000 AND foo = "bar)

In the given examples I don't see if this is possible, or I'm not sure how RedisOM handles multiple AND & OR associations.
Or is there at least a way to print the generated search-query?

[EDIT: one can log the search query:

const search = albumRepository.search().where('year').eq(1984);
console.log(search.query);
await search.return.all();

]

Thank you!

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