Query builder for Full Text Search #183

Closed
codeconsole opened this Issue Dec 7, 2012 · 4 comments

Projects

None yet

3 participants

@codeconsole

https://developers.google.com/appengine/docs/java/search/overview#Simple_Queries

search.execute {
    select author, subject, summary from User limit 100
}

from 'User' is search.index("User")
author, subject, summary are search.index("User").setFieldsToReturn("author", "subject", "summary")
limit is search.index("User").setLimit(limit)

// select the full document with all its properties
select all
// return just the ids of the documents matched by the query
select ids
// return one single entity if the query really returns one single result
select single
// return the count of entities matched by the query
select count
// return just a few properties 
select name, age

// from an index
from index

where EXPRESSION

// you can use "and" instead of "where" to add more where clauses

// ascending sorting
sort asc  by propertyName
// descending sorting
sort desc by propertyName

// limit to only 10 results
limit 10
// return the results starting from a certain offset
offset 100

// cursor handling
startAt cursorVariable
startAt cursorWebSafeStringRepresentation
endAt cursorVariable
endAt cursorWebSafeStringRepresentation
@glaforge

This would indeed be nice to support that syntax, in the same vein as the Gaelyk datastore queries syntax.
You're planning on implementing that?

@codeconsole

Still conceptualizing at this point... :)

@musketyr

👍 the search API is so far so bad

@musketyr musketyr added a commit that referenced this issue Apr 28, 2013
@musketyr musketyr search dsl #183 a482315
@musketyr musketyr added a commit that referenced this issue May 6, 2013
@musketyr musketyr documenting new search API #183 8f51ce3
@musketyr musketyr closed this May 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment