Starting a Search
To execute a search you first need to create a
neo.xredsys.content.search.Expression
object as
follows:
neo.xredsys.content.search.Expression expression = new neo.xredsys.content.search.DefaultExpression();
Then you need to set a couple of the object's properties as follows:
expression.setParameter("searchEngineName", "LucySearchEngine"); expression.setSearchString("search-string");
The first property must be either be set to the name of the
default search engine instance used by Content Studio,
LucySearchEngine
, or to the name of another search
engine instance that you have defined (see Set LucySearchEngine Properties).
The second property is the string to search for. Specifying
Escenic*
, for example, will search for all articles
containing words that start with the string
Escenic.
Finally, you can execute the query as follows:
neo.xredsys.content.search.SearchResult result = neo.xredys.api.IOAPI.getAPI().getObjectLoader().articleSearch(expression);