Multiple conditions in redisgraph full text queryNodes method

Hi, have couple of questions on redisgraph full text index support

  1. Does redisgraph full text index query (db.idx.fulltext.queryNodes) supports specifying multiple search strings combined with logical AND, OR operators?
  2. If I have created full text index on say two properties of a node, then can I specify in which property to search for for the given search string.

Example for both of the above is the below query which is supported in neo4j

CALL db.index.fulltext.queryNodes('name_index', 'first_name:kapil AND last_name:sharma')
YIELD node
RETURN node.first_name as fname, node.last_name as lname limit 10

where name_index is the index name, first_name and last_name are the node properties on which index is created.

Please let me know if this is supported or planned to be incorporated in future. Also if there is any alternative way for searching for multiple search strings.

Thanks in advance.

RedisGraph uses RediSearch as its full-text index, please consult with the RediSearch query syntax documentation

Here’s a quick example:
Create two Person nodes:
Create a full-text index over Person’s first_name and last_name
Query the index for a Person with first_name ‘jon’ or ‘miocic’ or last_name ‘jon’ or ‘miocic’

GRAPH.QUERY g "CREATE (:Person {first_name:'jon', last_name:'jones'})"
GRAPH.QUERY g "CREATE (:Person {first_name:'stipe', last_name:'miocic'})"
GRAPH.QUERY g "CALL db.idx.fulltext.createNodeIndex('Person', 'first_name', 'last_name')"
GRAPH.QUERY g "call db.idx.fulltext.queryNodes('Person', '@first_name|last_name:(jon|miocic)')"
1 Like