Missing Label Indexes

Hi,

I recently noticed that simple label lookups like

MATCH (n:Resource) RETURN n LIMIT 5

Take very long. When I ran PROFILE, I noticed that all label lookups were doing AllNodesScan instead of NodeByLabelScan. I don't recall deleting any special indexes for node labels, but if I did, is there a way to recreate them to get fast NodeByLabelScan lookups again?

An update on this. I have tried creating a few nodes of a new label :TestLabel, and finding nodes of that label does not use the NodeByLabelScan for search. So it appears somehow the functionality is broken for the DBMS. Restarting has not fixed it.

Hi @alex3,

That's kinda weird. What version are you using?

Hi @alex3 ,

Can you execute

CREATE LOOKUP INDEX node_label for (n) on each labels(n)

and then retry?

Bennu

Fixed!!! Thank you so much.