Question: I'm currently working on a movie recommendation query that should return the movies with the most "recommendation impact" using the following cypher query:

```
match (m:Movie) 
with m, size((m)<-[:LIKED]-(:User)-[:LIKED]->(:Movie)) as score
order by score desc
limit 10
return m.title, score

```

After reading the graphdb (neo4j) e-book my assumption was that this whould be an easy query for neo4j but the execution time took 32737 ms which is not what I was expecting. Does any one have experience with these kind of queries and has any suggestions to improve performance? Or should this query perform well and do I need to do some neo4j / java configuration tuning?

The profile of the query:

[![enter image description here](https://i.stack.imgur.com/dr7Lo.png)](https://i.stack.imgur.com/dr7Lo.png)

The result:

[![enter image description here](https://i.stack.imgur.com/pdjgy.png)](https://i.stack.imgur.com/pdjgy.png)

Answer: 
You can simply remove element from array using below method

```
categories .splice( $.inArray(removeItem, categories), 1 );//removeItem is name of item which you want to remove from array

```
If you want to remove, for example, "Lenovo" from:

```
 var categories = ["Lenovo","Large","100"]; 

```

do:

```
 categories.splice(0)

```