I am saving data as follows in the Firebase:
I want to find all records that have #Yahoo in their title. What will be the exact query for that?
I am
Answer : simply do following query :
databaseReference.orderByChild('_searchLastName')
.startAt(queryText)
.endAt(queryText+"\uf8ff");
We can combine startAt and endAt to limit both ends of our query. The following example finds all dinosaurs whose name starts with the letter b:
curl 'https://dinosaur-facts.firebaseio.com/dinosaurs.json?orderBy="$key"&startAt="b"&endAt="b\uf8ff"&print=pretty'
The \uf8ff character used in the query above is a very high code point in the Unicode range. Because it is after most regular characters in Unicode, the query matches all values that start with a b.
Here's a related question and the official docs.