QueryParts

What a search asks for beyond plain words:

  • "Quoted phrases": only items whose text (read in them, or their caption) has exactly that phrase, punctuation aside, like Google Photos. A quote still being typed counts.

  • Several people ("hamilton and rosberg", "lewis hamilton & nico"): only items with all of them, when every word names one of the people, and they're at least two.

Types

Link copied to clipboard
class Phrases(val phrases: List<List<String>>, val open: Boolean)

The phrases in quotes, each as its words; open when the last quote isn't closed yet.

Functions

Link copied to clipboard

Whether text has every phrase, word for word, punctuation and case aside.

Link copied to clipboard
fun people(query: String, people: List<Person>): List<Person>?

The people a query names, when it names two or more and nothing else: each word must start a word of exactly one chosen person's name. Null otherwise (one person, or other words in it), so plain searches work as before.

Link copied to clipboard
Link copied to clipboard
fun words(text: String): List<String>