Skip to content

Instantly share code, notes, and snippets.

"resource": {
"_source": {
"enabled": false
},
"properties": {
"id": {
"type": "string",
"store": "yes",
"index": "no"
},
```
$ cqlsh -3
use oae;Connected to test-1.2.15 at localhost:9160.
[cqlsh 3.1.7 | Cassandra 1.2.15-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh> use oae;
cqlsh:oae> SELECT "userId" FROM "AuthenticationLoginId" WHERE "loginId" = 'oae:twitter:meestaveesa';
Request did not complete within rpc_timeout.
cqlsh:oae> SELECT "userId" FROM "AuthenticationLoginId" WHERE "loginId" = 'blah';
cqlsh:oae> SELECT * FROM "AuthenticationLoginId" LIMIT 5;
query: {
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"multi_match": {
"fields": [
"q_high^2.0",
object Main {
trait ~>[F[_], G[_]] {
def apply[T](t: F[T]): G[T]
}
// ERROR: Compiler doesn't think this implements `def apply[T](t: F[T]): G[T]` :(
class Poly1[F[_], G[_]] extends ~> {
[error] .../case-config/modules/core/src/test/scala/com/pellucid/caseconfig/TypelevelConfig2CaseConfigSpec.scala:182: class List is not a simple type or a case class
[error] config.getConfig("allWithCase0").get[AllSimpleTypesWithCaseRequired] should be(allWithCase0Required)
[error] ^
[error] one error found
[error] (core/test:compile) Compilation failed
[error] Total time: 2 s, completed 1-Nov-2014 10:32:00 AM
[info] /private/tmp/case-config/modules/core/src/test/scala/com/pellucid/caseconfig/TypelevelConfig2CaseConfigSpec.scala:188: extractors.this.CTypeExtractor.optionExtractor is not a valid implicit value for com.pellucid.caseconfig.extractors.CTypeExtractor[Option[com.pellucid.caseconfig.AllSimpleTypesRequired]] because:
[info] hasMatchingSymbol reported error: diverging implicit expansion for type com.pellucid.caseconfig.extractors.CTypeExtractor[List[com.pellucid.caseconfig.Bytes]]
[info] starting with macro method caseClassExtractor in trait LowPriorityExtractors0
[info] config.getConfig("allWithCase0").get[AllSimpleTypesWithCaseOptional] should be(allWithCase0Optional)
/**
* Create an ElasticSearch filter that will filter to only users that are in the current user's
* group network. Generally speaking, it could be said that it "filters to resources whose direct
* memberships intersect with the direct and indirect memberships of the current user." While this
* method does not specifically filter to only user resources, it is implied as only users have
* memberships search documents associated to them.
*
* @param {String} userId The id of the user whose user network to create a filter for
* @param {String[]} indirectGroupIds The list of group ids to which the user has indirect access (i.e., is a member of by virtue of direct membership in another group)
@mrvisser
mrvisser / nakamura-message-example.java
Created May 29, 2012 13:19
Creating a simple entity for the OAE Infinispan Storage API proto-type
@Indexed @ProvidedId
public class Message implements Entity, DeepCopy<Message>, Serializable {
public String key;
public String from;
@Field
public String to;
@mrvisser
mrvisser / gist:3084440
Created July 10, 2012 16:20
New solr search "parameters" handling whiteboard
// DomainObjectQueryHandler will assert a generic "SearchInfo" data-type
public abstract class DomainObjectQueryHandler<T extends SearchInfo> {
...
public abstract T buildSearchInfo(HttpServletRequest request);
...
public String refineQString(T searchInfo) {
return null;
}
}
@mrvisser
mrvisser / context-plugin
Created September 12, 2012 21:21
Sample plugability in Context
// oae-context/lib/api.js
/**
* A generic context object that represents a user execution context.
*
* @param {String} tenantId The unique id of the tenant in the context (e.g., 'cam')
* @param {String} userUuid The UUID of the active user in the context (e.g., 'u:cam:nicolaas')
*/
var Context = module.exports.Context = function(tenantId, userUuid) {