Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Query builder for Full Text Search #183

Closed
codeconsole opened this Issue · 4 comments

3 participants

@codeconsole
Owner

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
Owner

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
Owner

Still conceptualizing at this point... :)

@musketyr
Owner

:+1: the search API is so far so bad

@musketyr
Owner

we should also consider adding search expressions such as distance and geopoint

@musketyr musketyr referenced this issue from a commit
@musketyr musketyr search dsl #183 a482315
@musketyr musketyr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.