0

In my Android App, the user wants to search for a book by its book name(title) . Now the problem that I face is that the user's will not always ,rather, most likely not be equal to the book name that is already there for various books posted by various other users .

So how do I search for books having the same book name without taxing the client's phone.

For example

enter image description here

If I use Firebase's native OrderByChild().equalTo() function , the user will have to explicitly type "ABC".But I want to make sure that my app returns this Book even when the user just types "abc " or "a" .

EDIT:- If your are gonna suggest me to write some server-side code , please help me on how I should proceed because I have read the other questions and still understood nothing.

Thanks in advance .

1
  • FirebaseDatabase.getInstance() .getReference("BookFair").orderByChild("bookName").startAt("Abc").endAt("abc"); Dec 27, 2016 at 13:29

1 Answer 1

1

What you are looking for is called Full-text search. Unfortunately, firebase does not provide this feature out-of-the-box.

This link might give you a idea of what you need to do.

Basically you need to setup another server for indexing your content.

Check this out if you need an idea about full text search

Not the answer you're looking for? Browse other questions tagged or ask your own question.