Uploaded image for project: 'S2Graph'
  1. S2Graph
  2. S2GRAPH-220

Filter clause is not working on AnnoyModelFetcher

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: s2core, s2graphql
    • Labels:
      None

      Description

      Below query should filter all edges that have property 'score' smaller than 0.1 but current implementation return edges with larger score property value than 0.1.

      {
        s2graph {
          user(id: 0) {
            friends(limit: 10, filter: "score < 0.1") {
              user {
                id
              }
            }
          }
        }
      }
      

      After a look through the current master, I found out Where parser and EdgeTransformer are processed on AsynchbaseEdgeFetcher and RocksEdgeFetcher by calling StorageIO.toEdges method, but this is missing on AnnoyModelFetcher.

      I suggest to extract `Where` and `EdgeTransformer` from StorageIO.toEdges to helper so other Fetcher implementation can easily use this helper to apply them correctly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                steamshon Do Yung Yoon
                Reporter:
                steamshon Do Yung Yoon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 168h
                  168h
                  Remaining:
                  Remaining Estimate - 168h
                  168h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified