Hi Erik,
What's the reason the search doesn't work for folders?

I had a use case for that this weekend: I was writing an extension to
bookmark all open tabs, and wanted to retrieve a particular folder to store
them in.

-Nick

On Sat, Aug 29, 2009 at 2:24 PM, Erik Kay <[email protected]> wrote:

>
> On Fri, Aug 28, 2009 at 9:07 AM, Erik Kay<[email protected]> wrote:
> > On Fri, Aug 28, 2009 at 6:22 AM, disya2<[email protected]> wrote:
> >> At bookmarks API doc page I failed to find what is "query" in "search"
> >> method. After some research I found that people pass folder names and
> >> urls to find something but found no detailed description. Is there a
> >> clear definition of that "query"? Can I use regexp, wildcards? How
> >> could I write queries for bookmarks/folders only?
> >
> > Search works for bookmarks only, not folders.  "query" is broken up
> > into individual "words".  If those words appear anywhere in the title
> > or URL (as case-insensitive substring matches), then the bookmark will
> > match the query.  There are no regexps or wildcards.  Here are some
> > examples:
> >
> > (1) Foo bar baz - http://www.example.com/hello
> > (2) foo quux - http://www.example.com/bar
> > (3) bar baz - http://www.google.com/hello
> >
> > "bar hello" - matches (1) and (3)
> > "foo hello" - matches (1)
> > "foo example" - matches (1) and (2)
> > "foo bar" - matches (1) and (2)
>
> Apologies, but my examples are incorrect.  The phrasing should be
> "only if all of the words appear in the title or all of the words
> appear in the URL".  It doesn't work in combination with one word in
> the title and one word in the URL.
>
> So in my above examples, only the last one would match anything (1).
>
> Given the above data, let's try a few better examples:
> "bar baz" - matches (1) and (2)
> "www hello" - matches (1) and (3)
> "bar example" - matches (2)
>
> Erik
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to