<commit_before>Movie data walkthrough
===

# Range queries

## Direct movie search
### query by movie title
 	SELECT * from Movies m
 	WHERE m.title = "Ant-Man"

### query by vote score
 	SELECT * from Movies m
 	WHERE m.vote_average = 3

### what about a range? (show query cost)
 	SELECT * from Movies m
 	WHERE m.vote_average > 2
 	AND m.vote_average < 3

### convert vote_average to range query

### re-run query (show query cost)<commit_msg>added hash index section<commit_after>Movie data walkthrough
===

## hash queries
 * We'll search for a specific movie title or other attribute

### query by movie title
	SELECT * from Movies m
	WHERE m.title = "Ant-Man"

### query by vote score
 	SELECT * from Movies m
 	WHERE m.vote_average = 3

 	SELECT * from Movies m
 	WHERE m.vote_average = 3
### query on subdocuments: Find document with genre array containing Comedy

* Indexes are automatically created for every single property
* Usable as soon as content is saved

## Range queries


### what about a range? (show query cost)
 	SELECT * from Movies m
 	WHERE m.vote_average > 2
 	AND m.vote_average < 3

### convert vote_average to range query
 * collection is still accessible during conversion - async background operation

### re-run query (show query cost)
{'fraction_non_alphanumeric': 0.08037825059101655, 'fraction_numerical': 0.005516154452324665, 'mean_word_length': 3.774436090225564, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '66380', 'n_tokens_mistral': 405, 'n_tokens_neox': 359, 'n_words': 166}