Neo4j – APOC Index suchen über Lucene

Config in neo4j.conf

 

# Set this parameter equal to true to enable it

apoc.autoIndex.enabled=true

apoc.autoIndex.async=true

apoc.autoIndex.async_rollover_opscount=10000

apoc.autoIndex.async_rollover_millis=5000

# A list of node property names (comma separated) that will be indexed by default.

#dbms.auto_index.nodes.keys=name,sourcepath

dbms.security.procedures.unrestricted=apoc.*

 

Zuerst muss ein Index gebildet werden

Index Management

Add node to index example

 

match (p:Person) call apoc.index.addNode(p,["name","age"]) RETURN count(*);
// 129s for 1M People
call apoc.index.nodes('Person','name:name100*') YIELD node, weight return * limit 2

 

 

Aus <https://neo4j-contrib.github.io/neo4j-apoc-procedures/#_index_queries>

Gibt ein unscharfes, gewichtetes Ergebnis zurück

call apoc.index.nodes(‚ADAccount‘,’cn:Gomell~100′) YIELD node, weight return node.cn, weight order by weight desc

node.cn

weight

thomas gomell

3.4984402656555176

thomas gomell

3.4984402656555176

thomas gosell

2.9153668880462646

thomas gomell. admin

2.3322935104370117

thomas grell

2.099064350128174

hildegard grell

2.099064350128174

stephan grell

2.099064350128174

bernd grell

2.099064350128174

alexander grell

2.099064350128174

zita grell

2.099064350128174

imke grell

2.099064350128174

reinhardt grell

2.099064350128174

hertha grell

2.099064350128174

wolfgang grell

2.099064350128174

georg grell

2.099064350128174

cornelia goll

1.7492201328277588

waltraud goll

1.7492201328277588

rüdiger goll

1.7492201328277588

ingeborg goll

1.7492201328277588

oliver goll

1.7492201328277588

käthe goll

1.7492201328277588

susi goll

1.7492201328277588

marie goll

1.7492201328277588

christel paul grell

1.6792515516281128

dora tom grell

1.6792515516281128

martina mario grell

1.6792515516281128

jens armin grell

1.6792515516281128

claire heidi grell

1.6792515516281128

marie marcel grell

1.6792515516281128

Permanentlink zu diesem Beitrag: https://help.migraven.com/neo4j-apoc-index-suchen-ueber-lucene/