0

I'm trying to build Java app that search for files including a "word" in a content of files inside dropbox folder.

As we can see in Dropbox docs:

https://www.dropbox.com/developers/documentation/http#documentation-files-search

we can do that using "filename_and_content".

I suppose that the fragment of Java code allowing to set "filename_and_content" should look like this:

SearchBuilder searchBuilder = client.files.searchBuilder("/duke/duke/Daily_Activity_Reports", "plik");

searchBuilder.mode(Files.SearchMode.filenameAndContent);

But how should I use this SearchBuilder in searching?

1

1 Answer 1

0

Once you have the SearchBuilder object configured the way you want, you can then call the start method on it to begin searching. The documentation for the start method can be found here.

It returns a SearchResults object with the results, as well as more, which tells you if there are more results available, and start, which you should pass back to the start method in order to get the rest of the results.

9
  • Thank you for your answer Greg.
    – michal
    Commented Nov 13, 2015 at 7:46
  • I use searchBuilder.mode(Files.SearchMode.filenameAndContent) to enable searching through content of files, but it's not working have you got any idea why?
    – michal
    Commented Nov 13, 2015 at 8:25
  • What do you mean by "not working" exactly? One thing that may be relevant is that content search currently only works for business accounts.
    – Greg
    Commented Nov 13, 2015 at 18:06
  • Ohhhhhh. So that may be the reason!!
    – michal
    Commented Nov 14, 2015 at 15:31
  • 1
    @powder366 This should be fixed now.
    – Greg
    Commented Dec 8, 2016 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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