# Use full text search and Personalized PageRank combined

**URL:** <https://community.neo4j.com/t/use-full-text-search-and-personalized-pagerank-combined/25373>\
**Category:** Neo4j Graph Platform\
**Created:** [September 15, 2020, 12:20pm UTC](https://community.neo4j.com/t/use-full-text-search-and-personalized-pagerank-combined/25373 "2020-09-15T12:20:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![admin3](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/admin3/32/10591_2.png) [@admin3](https://community.neo4j.com/u/admin3)\
**Post date:** [September 15, 2020, 12:20pm UTC](https://community.neo4j.com/t/use-full-text-search-and-personalized-pagerank-combined/25373/1 "2020-09-15T12:20:40Z")

</div>

Hi,

I am trying to combine all these options in one query but I can't find a way to work it out

```auto
MATCH (actor:Actor {uuid:...)-[:PLAYED_IN]->(movie)<-[:PLAYED_IN]-(coactor)-[:PLAYED_IN]->(movie2)<-[:PLAYED_IN]-(cocoactor)
WHERE movie<movie2 AND coactor<>actor AND cocoactor<>coactor
WITH COLLECT(coactor) + COLLECT(cocoactor) AS sourceNodes

CALL gds.pageRank.stream(
  'CALL db.index.fulltext.queryNodes("names", "*~") YIELD node, score
   RETURN id(node) as id',
   {sourceNodes: sourceNodes})
YIELD nodeId, score
WITH gds.util.asNode(nodeId) AS n, score
RETURN n

```

The error I am getting is

```auto
Failed to invoke procedure 'gds.pageRank.stream': Caused by: java.util.NoSuchElementException: Cannot find graph with name 'CALL db.index.fulltext .................. RETURN id(node) as id'.

```

I am using GDS 1.3, neo4j 4.1 and apoc 4.1.0.1

Any ideas how to include fulltext in pageRank?  
Thanks

---

<div class="post-metadata">

**Author:** ![tony.chiboucas](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tony.chiboucas/32/5980_2.png) [@tony.chiboucas](https://community.neo4j.com/u/tony.chiboucas)\
**Post date:** [September 15, 2020, 6:02pm UTC](https://community.neo4j.com/t/use-full-text-search-and-personalized-pagerank-combined/25373/2 "2020-09-15T18:02:55Z")

</div>

What kind of results are you expecting?

`gds.pageRank.stream` expects a graph (nodes and rels) from the Labels and Rels specified, but all you feeding it is the internal node id. I can't make much sense of what you're looking for from this, so I'm not surprised the computer is getting confused.

`gds.pageRank.stream("LabelName", "REL-NAME")`

### Alt

You _could_ mutate the graph, but that wouldn't be ideal with multiple concurrent users:

```auto
CALL db.index.fulltext.queryNodes("names", "*~") YIELD node, score
SET node.tempIndexScore=score
SET node :TempStreamLabel
WITH node
MATCH (node)-[r]-(node)
SET r :TempRelLabel;

CALL gds.pageRank.stream("TempStreamLabel", "TempRelLabel") YIELD nodeId, score
WITH gds.util.asNode(nodeId) AS n, score
RETURN n, score, n.tempIndexScore as indexScore, (score + n.tempIndexScore) as combinedScore
ORDER BY combinedScore DESC;

```
