cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

fulltext search for specific field

Does neo4j support creating fulltext index for different labels' fields?

Just like this

create fulltext index ft_1 for (a:A|b:B) on each [a.f1, b.f2];

 

5 REPLIES 5

Hello @peaklu 😊

Yes, it's possible:

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

Regards,
Cobra

Maybe you misunderstood me or 

Now, I have label Movie {title, description} and label Book {title, description}, but I just want to add fulltext  index on Movie.title and Book.title&Book.description. The way you mentioned below adds index on 

property with the same name, that means it add index both (Movie.title&Movie.description) and (Book.title&Book.description).
CREATE FULLTEXT INDEX titlesAndDescriptions FOR (n:Movie|Book) ON EACH [n.title, n.description]

 

Sorry, I misunderstood, what you want do is not possible with one index, you will have to define two indexes.

Got it, thank you. By the way, does neo4j have any plan to support this way?

Not to my knowledge.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online