|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.fatwire.search.util.SearchUtils
public final class SearchUtils
This class is a general purpose factory class for building instances of several interfaces of Search API.
Field Summary | |
---|---|
static java.lang.String |
ALL_OF_THESE_WORDS |
static java.lang.String |
ANY |
static java.lang.String |
ANY_OF_THESE_WORDS |
static java.lang.String |
CUSTOM_RANGE |
static java.lang.String |
PAST_24_HOURS |
static java.lang.String |
PAST_MONTH |
static java.lang.String |
PAST_WEEK |
static java.lang.String |
PAST_YEAR |
Constructor Summary | |
---|---|
SearchUtils() |
Method Summary | |
---|---|
static SearchCriteria |
buildSearchCriteriaFromJson(java.lang.String jsonString, long siteId) |
static IndexSourceConfig |
getIndexSourceConfig() Retrieves an instance of IndexSourceConfig from Content Server. |
static SearchEngineConfig |
getSearchEngineConfig() Retrieves a SearchEngineConfig instance from Content Server; A SearchEngineConfig instance is used to retrieve the configure information for a search engine that is specified in Content Server search integration. |
static QueryExpression |
newQuery(java.lang.String stringValue) Creates a QueryExpression from a String |
static QueryExpression |
newQuery(java.lang.String fieldName, Operation op, java.util.List values) Creates a QueryExpression with a field name, an oprator, and a list of value |
static QueryExpression |
newQuery(java.lang.String fieldName, Operation op, java.util.List values, boolean negate) Creates a QueryExpression with a field name, an oprator, and a list of values |
static QueryExpression |
newQuery(java.lang.String fieldName, Operation op, java.lang.Object value) Creates a QueryExpression with a field name, an oprator, and a value |
static QueryExpression |
newQuery(java.lang.String fieldName, Operation op, java.lang.Object value, boolean negate) Creates a QueryExpression with a field name, an oprator, and value |
static java.lang.String |
replaceSingleQuote(java.lang.String text) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ANY
public static final java.lang.String ANY_OF_THESE_WORDS
public static final java.lang.String ALL_OF_THESE_WORDS
public static final java.lang.String PAST_YEAR
public static final java.lang.String PAST_MONTH
public static final java.lang.String PAST_WEEK
public static final java.lang.String PAST_24_HOURS
public static final java.lang.String CUSTOM_RANGE
Constructor Detail |
---|
public SearchUtils()
Method Detail |
---|
public static SearchEngineConfig getSearchEngineConfig() throws SearchEngineException
SearchEngineException
- if error occurs when getting the configuration classpublic static IndexSourceConfig getIndexSourceConfig() throws SearchEngineException
SearchEngineException
- if error met in getting the default implementation of IndexSourceConfigpublic static QueryExpression newQuery(java.lang.String stringValue)
stringValue
- the string format of a query expressionpublic static QueryExpression newQuery(java.lang.String fieldName, Operation op, java.lang.Object value)
fieldName
- the attribute name to queryop
- the operatorvalue
- the value for the query conditionpublic static QueryExpression newQuery(java.lang.String fieldName, Operation op, java.util.List values)
fieldName
- the attribute name to queryop
- the operatorvalues
- the list of values for the query conditionpublic static QueryExpression newQuery(java.lang.String fieldName, Operation op, java.lang.Object value, boolean negate)
fieldName
- the attribute name to queryop
- the operatorvalue
- value for the query conditionnegate
- the boolean indicator which indicates whether the query should is positive or negative; if negate is true, it would mean the query expression condition is "not" what specified. Otherwise, it would mean the query condition is what specified. Default to be false.public static QueryExpression newQuery(java.lang.String fieldName, Operation op, java.util.List values, boolean negate)
fieldName
- the attribute name to queryop
- the operatorvalues
- a list of values for the query conditionnegate
- the boolean indicator which indicates whether the query should is positive or negative; if negate is true, it would mean the query expression condition is "not" what specified. Otherwise, it would mean the query condition is what specified. Default to be false.public static SearchCriteria buildSearchCriteriaFromJson(java.lang.String jsonString, long siteId)
public static java.lang.String replaceSingleQuote(java.lang.String text)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.