weaviate / weaviate-graphql-prototype

weaviate-graphql-prototype
1 stars 2 forks source link

Implement the local search #8

Open bobvanluijt opened 6 years ago

bobvanluijt commented 6 years ago

Implement the following definitions;

{
  Local {
    HelpersFetch {
      PinPoint(_stack: [ENUM], _classes: [ARRAY], _properties: [ARRAY], _needle: "STRING", _searchType: [ENUM], _limit: 10) {
          uuid
      }
    }
  }
}

and to every property (with lower case) in the TargetedFetch for both Things and Actions:

{
  Local{
    TargetedFetch{
      Things{
        City{
          name(_needle: "STRING") # i.e. Amsterdam
        }
      }
    }
  }
}

Definitions

PinPoint = Find a set of exact ID's

uuid = UUID (maybe there is a GraphQL type for this)

_stack = Things or Actions ENUM _classes = an array of potential classes (they should be in the ontology!) _properties = an array of potential classes (they should be in the ontology, ideally related to the class!) _searchType = should be an ENUM but for now only 1 value: "standard" _needle = the actual field that will be used in the search. (for example: __needle: "Netflix" _limit = integer.

Results

For now all results can return: [{}]

PS: More info on ENUM types: https://medium.com/graphql-mastery/how-to-design-graphql-mutations-and-queries-part-2-enums-ebb01613832#c33f

laura-ham commented 6 years ago

For classes and properties: also search for not exact matching names / semantically similar names. @bobvanluijt

laura-ham commented 6 years ago
{
  Local{
    TargetedFetch{
      Things{
        City(<property_name(if value is no class)>: <property_value>){
          name # i.e. Amsterdam
        }
      }
    }
  }
}
laura-ham commented 6 years ago

Properties and values (=needles) should be matched, because search should be possible with more than one property+value defined to point to a specific Thing/Action

laura-ham commented 6 years ago

@bobvanluijt improve search and result definition