cancel
Showing results for 
Search instead for 
Did you mean: 

CREATE FULLTEXT INDEX across multiple nodes

3bfred
Node Link

I have 3 nodes - a:Person, b:Profile and c:Gig. I want to created a full text index in properties a.name, a.bio c.title, c.description 

I've successfully created an index that delivers what seems to be good  results using 

 

CALL db.index.fulltext.createNodeIndex("FT_Search", ["Person", "Gig", "Profile"], ["name", "title", "user_bio", "description"])
 
I'm being told that this is deprecated. However, I can't figure out the right syntax for the CREATE FULLTEXT INDEX.
 
Would be nice if the documentation have an example on this!
 
Thanks!
1 ACCEPTED SOLUTION

Her is an example in the text for multiple nodes and properties. Nodes labels are separated by a ‘|’ and properties are specified in a list. 

there is optional configuration map of values, but it doesn’t not provide a description of all the key/value pairs, unless the few discussed in the text is all of them. 

CREATE FULLTEXT INDEX titlesAndDescriptions FOR (n:Movie|Book) ON EACH [n.title, n.description]

View solution in original post

5 REPLIES 5

3bfred
Node Link

I've looked there and it's as clear as mud for me 🙂

It's clear for creating indexes on a single node, but not clear (for me) if >1 node with different property names.

3bfred
Node Link

Also, the queryNodes is not fully documented. For example, I want to limit the number of nodes returned and by trial and error I found you can add an extra options parameter with {limit: x} but unless I'm blind that is not documented anywhere.

Her is an example in the text for multiple nodes and properties. Nodes labels are separated by a ‘|’ and properties are specified in a list. 

there is optional configuration map of values, but it doesn’t not provide a description of all the key/value pairs, unless the few discussed in the text is all of them. 

CREATE FULLTEXT INDEX titlesAndDescriptions FOR (n:Movie|Book) ON EACH [n.title, n.description]

3bfred
Node Link

Thanks for your quick reply, much appreciated. I did try that but was not convinced it was correct.