dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Filtering on same predicate using multiple indices give unexpected result

Open all-seeing-code opened this issue 4 years ago • 1 comments

What version of Dgraph are you using?

Dgraph version : v2.0.0-rc1-452-g5c75240a3 Dgraph SHA-256 : c3fa23e3909376d2b5e567cbe963a81132c9c83e7e40b4051d56cba8105dece2 Commit SHA-1 : 5c75240a3 Commit timestamp : 2020-07-02 11:02:02 -0700 Branch : master Go version : go1.14

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, OS)?

RAM: 16gig OS: Linux/Ubuntu Model name: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz

Steps to reproduce the issue (command/config used to run Dgraph).

Schema:

name: string @index(term, trigram) .

Data:

{
    set {
        _:a <name> "Foo Edit" .
        _:a <dgraph.type> "User" .

        _:b <name> "Foo Edit1" .
        _:b <dgraph.type> "User" .

        _:c <name> "Ba" .
        _:c <dgraph.type> "User" .

        _:d <name> "Bar" .
        _:d <dgraph.type> "User" .

        _:e <name> "Barry" .
        _:e <dgraph.type> "User" .
    }
}

Query:

{            
    q (func: type("User")) @filter(anyofterms(name, "foo") OR match(name, "ba", 5)) {
        name
      }
}

Expected behavior and actual result.

Expected results: All 5 nodes Actual results: nodes for (“Ba”, “Bar”, “Barry”)

all-seeing-code avatar Jul 03 '20 08:07 all-seeing-code

Github issues have been deprecated. This issue has been moved to discuss. You can follow the conversation there and also subscribe to updates by changing your notification preferences.

drawing

minhaj-shakeel avatar Jul 16 '20 14:07 minhaj-shakeel