| Constructor and Description |
|---|
MockSearch() |
| Modifier and Type | Method and Description |
|---|---|
<P extends ParaObject> |
findById(String id)
Simple id search.
|
<P extends ParaObject> |
findById(String appid,
String id)
Simple id search.
|
<P extends ParaObject> |
findByIds(List<String> ids)
Simple multi id search.
|
<P extends ParaObject> |
findByIds(String appid,
List<String> ids)
Simple multi id search.
|
<P extends ParaObject> |
findNearby(String type,
String query,
int radius,
double lat,
double lng,
Pager... pager)
Search for
Address objects in a radius of X km from a given point. |
<P extends ParaObject> |
findNearby(String appid,
String type,
String query,
int radius,
double lat,
double lng,
Pager... pager)
Search for
Address objects in a radius of X km from a given point. |
<P extends ParaObject> |
findPrefix(String type,
String field,
String prefix,
Pager... pager)
Searches for objects that have a property which value starts with a given prefix.
|
<P extends ParaObject> |
findPrefix(String appid,
String type,
String field,
String prefix,
Pager... pager)
Searches for objects that have a property which value starts with a given prefix.
|
<P extends ParaObject> |
findQuery(String type,
String query,
Pager... pager)
Simple query string search.
|
<P extends ParaObject> |
findQuery(String appid,
String type,
String query,
Pager... pager)
Simple query string search.
|
<P extends ParaObject> |
findSimilar(String type,
String filterKey,
String[] fields,
String liketext,
Pager... pager)
Searches for objects that have similar property values to a given text.
|
<P extends ParaObject> |
findSimilar(String appid,
String type,
String filterKey,
String[] fields,
String liketext,
Pager... pager)
Searches for objects that have similar property values to a given text.
|
<P extends ParaObject> |
findTagged(String type,
String[] tags,
Pager... pager)
Searches for objects tagged with one or more tags.
|
<P extends ParaObject> |
findTagged(String appid,
String type,
String[] tags,
Pager... pager)
Searches for objects tagged with one or more tags.
|
<P extends ParaObject> |
findTags(String keyword,
Pager... pager)
Searches for
Tag objects. |
<P extends ParaObject> |
findTags(String appid,
String keyword,
Pager... pager)
Searches for
Tag objects. |
<P extends ParaObject> |
findTermInList(String type,
String field,
List<?> terms,
Pager... pager)
Searches for objects having a property value that is in list of possible values.
|
<P extends ParaObject> |
findTermInList(String appid,
String type,
String field,
List<?> terms,
Pager... pager)
Searches for objects having a property value that is in list of possible values.
|
<P extends ParaObject> |
findTerms(String type,
Map<String,?> terms,
boolean matchAll,
Pager... pager)
Searches for objects that have properties matching some given values.
|
<P extends ParaObject> |
findTerms(String appid,
String type,
Map<String,?> terms,
boolean matchAll,
Pager... pager)
Searches for objects that have properties matching some given values.
|
<P extends ParaObject> |
findWildcard(String type,
String field,
String wildcard,
Pager... pager)
Searches for objects that have a property with a value matching a wildcard query.
|
<P extends ParaObject> |
findWildcard(String appid,
String type,
String field,
String wildcard,
Pager... pager)
Searches for objects that have a property with a value matching a wildcard query.
|
Long |
getCount(String type)
Counts indexed objects.
|
Long |
getCount(String type,
Map<String,?> terms)
Counts indexed objects matching a set of terms/values.
|
Long |
getCount(String appid,
String type)
Counts indexed objects.
|
Long |
getCount(String appid,
String type,
Map<String,?> terms)
Counts indexed objects matching a set of terms/values.
|
void |
index(ParaObject po)
Indexes an object.
|
void |
index(String appid,
ParaObject po)
Indexes an object.
|
void |
index(String appid,
ParaObject po,
long ttl)
Indexes an object.
|
<P extends ParaObject> |
indexAll(List<P> objects)
Indexes multiple objects in a batch operation.
|
<P extends ParaObject> |
indexAll(String appid,
List<P> objects)
Indexes multiple objects in a batch operation.
|
void |
unindex(ParaObject po)
Removes an object from the index.
|
void |
unindex(String appid,
ParaObject po)
Removes an object from the index.
|
<P extends ParaObject> |
unindexAll(List<P> objects)
Removes multiple objects from the index in a batch operation.
|
void |
unindexAll(Map<String,?> terms,
boolean matchAll)
Removes multiple objects from the index matching a set of terms.
|
<P extends ParaObject> |
unindexAll(String appid,
List<P> objects)
Removes multiple objects from the index in a batch operation.
|
void |
unindexAll(String appid,
Map<String,?> terms,
boolean matchAll)
Removes multiple objects from the index matching a set of terms.
|
public void index(ParaObject po)
SearchStored are indexed.public void index(String appid, ParaObject po)
SearchStored are indexed.public void index(String appid, ParaObject po, long ttl)
SearchStored are indexed.
Automatically removes the object from the index after TTL milliseconds.public void unindex(ParaObject po)
Searchpublic void unindex(String appid, ParaObject po)
Searchpublic <P extends ParaObject> void indexAll(List<P> objects)
Searchpublic <P extends ParaObject> void indexAll(String appid, List<P> objects)
Searchpublic <P extends ParaObject> void unindexAll(List<P> objects)
SearchunindexAll in interface SearchP - type of the objectobjects - a list of objectspublic <P extends ParaObject> void unindexAll(String appid, List<P> objects)
SearchunindexAll in interface SearchP - type of the objectappid - name of the Appobjects - a list of objectspublic void unindexAll(Map<String,?> terms, boolean matchAll)
SearchunindexAll in interface Searchterms - a list of termsmatchAll - if true all terms must match ('AND' operation)public void unindexAll(String appid, Map<String,?> terms, boolean matchAll)
SearchunindexAll in interface Searchappid - name of the Appterms - a list of termsmatchAll - if true all terms must match ('AND' operation)public <P extends ParaObject> P findById(String id)
Searchpublic <P extends ParaObject> P findById(String appid, String id)
Searchpublic <P extends ParaObject> List<P> findByIds(List<String> ids)
Searchpublic <P extends ParaObject> List<P> findByIds(String appid, List<String> ids)
Searchpublic <P extends ParaObject> List<P> findNearby(String type, String query, int radius, double lat, double lng, Pager... pager)
SearchAddress objects in a radius of X km from a given point.findNearby in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()query - the query stringradius - the radius of the search circlelat - latitudelng - longitudepager - a Pagerpublic <P extends ParaObject> List<P> findNearby(String appid, String type, String query, int radius, double lat, double lng, Pager... pager)
SearchAddress objects in a radius of X km from a given point.findNearby in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()query - the query stringradius - the radius of the search circlelat - latitudelng - longitudepager - a Pagerpublic <P extends ParaObject> List<P> findPrefix(String type, String field, String prefix, Pager... pager)
SearchfindPrefix in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()field - the property name of an objectprefix - the prefixpager - a Pagerpublic <P extends ParaObject> List<P> findPrefix(String appid, String type, String field, String prefix, Pager... pager)
SearchfindPrefix in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()field - the property name of an objectprefix - the prefixpager - a Pagerpublic <P extends ParaObject> List<P> findQuery(String type, String query, Pager... pager)
SearchfindQuery in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()query - the query stringpager - a Pagerpublic <P extends ParaObject> List<P> findQuery(String appid, String type, String query, Pager... pager)
SearchfindQuery in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()query - the query stringpager - a Pagerpublic <P extends ParaObject> List<P> findSimilar(String type, String filterKey, String[] fields, String liketext, Pager... pager)
SearchfindSimilar in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()filterKey - exclude an object with this key from the results (optional)fields - a list of property namesliketext - text to compare topager - a Pagerpublic <P extends ParaObject> List<P> findSimilar(String appid, String type, String filterKey, String[] fields, String liketext, Pager... pager)
SearchfindSimilar in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()filterKey - exclude an object with this key from the results (optional)fields - a list of property namesliketext - text to compare topager - a Pagerpublic <P extends ParaObject> List<P> findTagged(String type, String[] tags, Pager... pager)
SearchfindTagged in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()tags - the list of tagspager - a Pagerpublic <P extends ParaObject> List<P> findTagged(String appid, String type, String[] tags, Pager... pager)
SearchfindTagged in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()tags - the list of tagspager - a Pagerpublic <P extends ParaObject> List<P> findTags(String keyword, Pager... pager)
SearchTag objects.
This method might be deprecated in the future.public <P extends ParaObject> List<P> findTags(String appid, String keyword, Pager... pager)
SearchTag objects.
This method might be deprecated in the future.public <P extends ParaObject> List<P> findTermInList(String type, String field, List<?> terms, Pager... pager)
SearchfindTermInList in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()field - the property name of an objectterms - a list of terms (property values)pager - a Pagerpublic <P extends ParaObject> List<P> findTermInList(String appid, String type, String field, List<?> terms, Pager... pager)
SearchfindTermInList in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()field - the property name of an objectterms - a list of terms (property values)pager - a Pagerpublic <P extends ParaObject> List<P> findTerms(String type, Map<String,?> terms, boolean matchAll, Pager... pager)
SearchfindTerms in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()terms - a map of fields (property names) to terms (property values)matchAll - match all terms. If true - AND search, if false - OR searchpager - a Pagerpublic <P extends ParaObject> List<P> findTerms(String appid, String type, Map<String,?> terms, boolean matchAll, Pager... pager)
SearchfindTerms in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()terms - a map of fields (property names) to terms (property values)matchAll - match all terms. If true - AND search, if false - OR searchpager - a Pagerpublic <P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager)
SearchfindWildcard in interface SearchP - type of the objecttype - the type of object to search for. See ParaObject.getType()field - the property name of an objectwildcard - wildcard query string. For example "cat*".pager - a Pagerpublic <P extends ParaObject> List<P> findWildcard(String appid, String type, String field, String wildcard, Pager... pager)
SearchfindWildcard in interface SearchP - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()field - the property name of an objectwildcard - wildcard query string. For example "cat*".pager - a Pagerpublic Long getCount(String type)
SearchgetCount in interface Searchtype - the type of object to search for. See ParaObject.getType()public Long getCount(String appid, String type)
SearchgetCount in interface Searchappid - name of the Apptype - the type of object to search for. See ParaObject.getType()public Long getCount(String type, Map<String,?> terms)
SearchgetCount in interface Searchtype - the type of object to search for. See ParaObject.getType()terms - a list of terms (property values)public Long getCount(String appid, String type, Map<String,?> terms)
SearchgetCount in interface Searchappid - name of the Apptype - the type of object to search for. See ParaObject.getType()terms - a map of fields (property names) to terms (property values)Copyright © 2016 Erudika. All rights reserved.