[Are Tom's posts being moderated?  I'm seeing them days later]

On Tue, Jul 30, 2013 at 7:38 PM, Tom Kerr <[email protected]> wrote:

> Hi Ben, thanks for your mail.
>
> Yea, after digging into the code I see there is not currently a way to
> do this, or perform queries with nested keys, such as:
>
> /query.json?query={"type": "/type/edition", "table_of_contents":
> {"pagenum": 19}}
>
> I would like to do something like
> /query.json?type=/type/edition&table_of_contents.pagenum=19
>
> I submitted a patch, but it is a hack:
> https://github.com/internetarchive/infogami/pull/2
>

If you can keep your editor from gratuitously changing whitespace, it'll
make patches easier to review.

Any thoughts on syntax, supposing I did try this?
>
> multi-value:
>
>      &subjects=war,peace
>      &subjects=[war,peace]
>      &subjects=war+OR+peace
>

There's also &subject=war&subject=peace but another approach would be to
just use a top level ?query=(search query language) type construct.  This
would allow you to more naturally deal with things like AND vs OR, etc.

Backing up a bit though, what's the motivation for avoiding JSON?  Are you
thinking that the user is going to construct this query by hand?

Tom
_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to