我无法使用“杰克琼斯”这样的两个单词类型进行搜索,它仅适用于单个单词(“杰克”),我如何找出答案?这是我的代码:
private void searchData(String s) {
adapter.stopListening();
query = notebookRef.whereEqualTo("isim", s.toLowerCase()).orderBy("isim", Query.Direction.DESCENDING);
FirestoreRecyclerOptions<Profiles> options = new FirestoreRecyclerOptions.Builder<Profiles>()
.setQuery(query, Profiles.class)
.build();
adapter = new FirestoreAdapterForProfiles(options);
recyclerView.setAdapter(adapter);
adapter.startListening();
}
确定,我发现这里是我更改的代码:
query = notebookRef.orderBy("isim").startAt(s.toLowerCase()).endAt(s+"\uf8ff");