filter.setOrder(NoteSortOrder.UPDATED.getValue());
filter.setAscending(false);
// Find the first 50 notes matching the search
System.out.println("Searching for notes matching query: " + query);
NoteList notes = noteStore.findNotes(filter, 0, 50);
System.out.println("Found " + notes.getTotalNotes() + " matching notes");
Iterator<Note> iter = notes.getNotesIterator();
while (iter.hasNext()) {
Note note = iter.next();
System.out.println("Note: " + note.getTitle());
// Note objects returned by findNotes() only contain note attributes