public interface Search
| 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.
|
void index(ParaObject po)
Stored are indexed.po - the domain object the object to indexvoid index(String appid, ParaObject po)
Stored are indexed.appid - name of the Apppo - the domain objectvoid index(String appid, ParaObject po, long ttl)
Stored are indexed.
Automatically removes the object from the index after TTL milliseconds.appid - name of the Apppo - the domain objectttl - time to live in milliseconds before the object is removed from the index.void unindex(ParaObject po)
po - the domain objectvoid unindex(String appid, ParaObject po)
appid - name of the Apppo - the domain object<P extends ParaObject> void indexAll(List<P> objects)
P - type of the objectobjects - a list of objects<P extends ParaObject> void indexAll(String appid, List<P> objects)
P - type of the objectappid - name of the Appobjects - a list of objects<P extends ParaObject> void unindexAll(List<P> objects)
P - type of the objectobjects - a list of objects<P extends ParaObject> void unindexAll(String appid, List<P> objects)
P - type of the objectappid - name of the Appobjects - a list of objectsvoid unindexAll(Map<String,?> terms, boolean matchAll)
terms - a list of termsmatchAll - if true all terms must match ('AND' operation)void unindexAll(String appid, Map<String,?> terms, boolean matchAll)
appid - name of the AppmatchAll - if true all terms must match ('AND' operation)terms - a list of terms<P extends ParaObject> P findById(String id)
P - type of the objectid - the id<P extends ParaObject> P findById(String appid, String id)
P - type of the objectappid - name of the Appid - the id<P extends ParaObject> List<P> findByIds(List<String> ids)
P - type of the objectids - a list of ids to search for<P extends ParaObject> List<P> findByIds(String appid, List<String> ids)
P - type of the objectappid - name of the Appids - a list of ids to search for<P extends ParaObject> List<P> findNearby(String type, String query, int radius, double lat, double lng, Pager... pager)
Address objects in a radius of X km from a given point.P - 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 Pager<P extends ParaObject> List<P> findNearby(String appid, String type, String query, int radius, double lat, double lng, Pager... pager)
Address objects in a radius of X km from a given point.P - 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 Pager<P extends ParaObject> List<P> findPrefix(String type, String field, String prefix, Pager... pager)
P - type of the objecttype - the type of object to search for. See ParaObject.getType()field - the property name of an objectprefix - the prefixpager - a Pager<P extends ParaObject> List<P> findPrefix(String appid, String type, String field, String prefix, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findQuery(String type, String query, Pager... pager)
P - type of the objecttype - the type of object to search for. See ParaObject.getType()query - the query stringpager - a Pager<P extends ParaObject> List<P> findQuery(String appid, String type, String query, Pager... pager)
P - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()query - the query stringpager - a Pager<P extends ParaObject> List<P> findSimilar(String type, String filterKey, String[] fields, String liketext, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findSimilar(String appid, String type, String filterKey, String[] fields, String liketext, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findTagged(String type, String[] tags, Pager... pager)
P - type of the objecttype - the type of object to search for. See ParaObject.getType()tags - the list of tagspager - a Pager<P extends ParaObject> List<P> findTagged(String appid, String type, String[] tags, Pager... pager)
P - type of the objectappid - name of the Apptype - the type of object to search for. See ParaObject.getType()tags - the list of tagspager - a Pager<P extends ParaObject> List<P> findTags(String keyword, Pager... pager)
Tag objects.
This method might be deprecated in the future.P - type of the objectkeyword - the tag keyword to search forpager - a Pager<P extends ParaObject> List<P> findTags(String appid, String keyword, Pager... pager)
Tag objects.
This method might be deprecated in the future.<P extends ParaObject> List<P> findTermInList(String type, String field, List<?> terms, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findTermInList(String appid, String type, String field, List<?> terms, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findTerms(String type, Map<String,?> terms, boolean matchAll, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findTerms(String appid, String type, Map<String,?> terms, boolean matchAll, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager)
P - 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 Pager<P extends ParaObject> List<P> findWildcard(String appid, String type, String field, String wildcard, Pager... pager)
P - 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 PagerLong getCount(String type)
type - the type of object to search for. See ParaObject.getType()Long getCount(String appid, String type)
appid - name of the Apptype - the type of object to search for. See ParaObject.getType()Long getCount(String type, Map<String,?> terms)
type - the type of object to search for. See ParaObject.getType()terms - a list of terms (property values)Long getCount(String appid, String type, Map<String,?> terms)
appid - 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.