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

Filter clause is not working on AnnoyModelFetcher

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Minor
    • Resolution: Done
    • None
    • None
    • s2core, s2graphql
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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