Page tree

Overview

AIE supports two REST API interfaces. 

  • JSON REST API: The newer API was designed for simplicity, and returns JSON documents as search results.  It can be used from a Javascript environment.
  • XML REST API: The older, or "legacy", API returns XML documents as query results.

The JSON API is the wave of the future here.  The XML API is not officially deprecated, but it should be used only in situations where the JSON API does not fully support your application. 

View incoming links.

HTTP GET/POST Parameters

The HTTP/REST API GET/POST Parameters are implemented through the com.attivio.sdk.search.QueryRequest . Note that the q and workflows HTTP GET/POST parameters are required.

 

ParameterType(1)DefaultMulti(2)DescriptionExample
abc.enabledbooleanfalsenoWhether or not the query should be annotated as an Attivio Business Center query.abc.enabled=true
cacheablebooleantruenoIs the result cacheable?cacheable=false
clientidStringoptionalnoClient ID.clientid=1234
collapseStringoptionalnoField collapsing specification.Example: collapse=cat(mode=2D, rows=10)
debugbooleanfalsenoEnable debugging information. true or falsedebug=true
facetStringoptionalyesComma separated list of discrete facet definitions.Example: facet=title(mincutoff=3,sortby=count),category(maxnumbuckets=
100)
facet.ffenumOFFnoFacet finder mode. [ OFF | CORPUS | RESULTS ]facet.ff=CORPUS
facet.ffcountunsigned3noLimit the number of facets returned by Facet Finder servicefacet.ffcount=4
facet.filterStringoptionalnoFacet bucket to use for filtering results.Example: facet.filter=department:"Sales Engineering"
fieldsStringoptionalyesComma separated list of field expressions to return with response documents.fields=*,geodistance(position, 72.3, 71.5, miles) AS distance
filterStringoptionalyesAdvanced Query Language filter. Preferred for programmatic/developer created filtersfilter=POLYGON(position, (5.0, 9.0), (5.0, 11.0), (6.0, 11.0),
(6.0, 9.0), units=radians)
geo.distanceFilterStringoptionalyesA distance geo search filtergeo.distanceFilter=5.5 or geo.distanceFilter=fieldName(minDistance=0.0, maxDistance=5.5, latitude=0.0, longitude=0.0, distanceUnits=MILES)
geo.distanceUnitsenumKILOMETERSnoThe units distances are specified. [ KILOMETERS | METERS | MILES | YARDS | NAUTICAL_MILES ]geo.distanceUnits=MILES
geo.fieldStringoptionalnoThe default field to use for geo search.geo.field=position
geo.latitudedoubleoptionalnoThe default latitude of center point for geo search.geo.latitude=0
geo.longitudedoubleoptionalnoThe default longitude of center point for geo search.geo.longitude=0
geo.polygonFilterStringoptionalyesA polygon geo search filtergeo.polygonFilter=[fieldName](0, 0) (1, 0) (1, 1) (0, 1)
highlightbooleanfalsenohighlight results based on schema configurationhighlight=true
highlight.modeenumHTMLnoMode for annotating matches and scopes in highlighted text. [ HTML, XML, TEXT, RAW ]highlight.mode=XML
highlight.scopeStringhighlightnoName of the scope used to annotate matching phrases in highlighted text.highlight.scope=highlight
hitsunsigned10LnoNumber of records to return.hits=100
includeMetadataInResponsebooleanfalsenoInclude non essential/data (from the index) information in the response. true or falsedebug=true
join.rollupenumAGGREGATEnoJoin children aggregation mode. [ AGGREGATE | TREE ]join.rollup=TREE
join.facetenumDISTINCTnoJoin children facet aggregation mode. [ DISTINCT | FULL ]join.facet=FULL
l.acronym.dictionaryStringoptionalnoName of the acronym dictionary to use.l.acronym.dictionary=myAcronymDictionary
l.acronyms.boostint100noSet boost for expanded acronyms.l.acronyms.boost=25
l.acronyms.modeenumOFFnoEnable acronym expansion. [ OFF | ON | AUTO ]l.acronyms.mode=off
l.clustering.clustercountunsigned50noNumber of result clusters to generatel.clustering.clustercount=100
l.clustering.doccountunsigned50noNumber of documents to consider for clusteringl.clustering.doccount=100
l.clustering.fieldsStringoptionalnoComma separated list of clustering fields.l.clustering.fields=title,body
l.clustering.modeenumOFFnoClustering mode. [ OFF | QUERY | DOCUMENT ]l.clustering.mode=query
l.spellexpandsizeunsigned2noSets the number of expanded suggestions that will be added for misspelled terms.l.spellexpandsize=2
l.spell.modeenumOFFnoSpelling Correction Mode. [ OFF | SUGGEST | AUTOCORRECT | AUTOEXPAND ]l.spell.mode=SUGGEST
l.stopwords.modeenumOFFnoEnable stop word removal. [ OFF | REMOVE | BLOCK ]l.stopwords.mode=off
l.synonym.dictionaryStringoptionalnoName of the synonym dictionary to use.l.synonym.dictionary=mySynonymDictionary
l.synonymBoostint100noset synonym boost or down weight.l.synoynmBoost=25
l.synonyms.modeenumOFFnoEnable synonyms. [ OFF | ON | AUTO ]l.synoynms.mode=off
localeStringenno2 letter iso code for locale.locale=en
offsetunsigned0LnoRetrieve number of records starting from offset.offset=20
partialResultsbooleanfalsenoEnable/Disable partial results from distributed indexespartialResults=false
qStringrequirednoQuery Stringq=cat
q.boostStringoptionalyesQuery Boost Expressionq.boost=foo
q.boost.typeStringadvancednoQuery Language used by query boosts. [ simple | advanced ]q.boost.type=advanced
q.filterStringoptionalyesSimple Query Language filter. Usually populated from a user-entered text box.q.filter=color:black
q.filter.typeStringsimplenoDeprecated. Query Language used by filter. [ simple | advanced ]q.filter.type=advanced
q.maxResubmitsunsigned0noMaximum number of times query can be resubmitted.q.maxResubmits=5
q.typeStringadvancednoQuery Language used. [ simple | advanced ]q.type=simple
rangeFacet.filterStringoptionalnoRange Facet bucket to use for filtering results.Example: rangeFacet.filter=size:[0 TO 50]
relevancymodelStringoptionalnoRelevancy model or model name configured in AIE to use for the queryrelevancyModel=name(myTestModel),defaultSearchField(100,
term(title,200,true,tfidf),term(anchortext,200,true,tfidf),phrase(title,
300,true,tfidf),phrase(anchortext,300,true,tfidf),completeness(title,
1000,true,tfidf),completeness(anchortext,1000,true,tfidf)),
freshness(date,0.0850),static(linkfactor,1.0)
relevancyModel=default
relevancyModelNameStringoptionalnoRelevancy model name configured in AIE to use for the query, such that it is not wrapped in "name()".  See also, "relevancymodel", above.relevancyModelName=myTestModel
schemaStringoptionalnoName of the schema to use for query processingschema=default
score.functionStringoptionalyesScore function to boost matching documents withscore.function=product(sum(5.5, boostfield), boostfactorfield)
scoringModelStringoptionalnoName of the scoring model to usescoringModel=default
searchProfileStringoptionalnoName of the search profile to use.searchProfile=mySearchProfile
searchDepthunsigned0noNumber of rows deep to search.searchDepth=100
seedlong0LnoSeed to use for random number generation (random sorting, etc)seed=38293843928
sortStringoptionalnoComma separated list of fields to sort by [ ASC | DESC ]sort=title:asc,body:desc
centertimeDateoptionalnoDate to use for current/center time for any date operations in YYYY-MM-ddTHH:mm:ss.SSS formatcentertime=2018-01-01T12:00:00.000
timezoneStringUTCnoTime Zone for date interpretation.timezone=EST
workflowsStringrequirednoComma separated list of workflows to send the query through.workflows=defaultQuery,searcher,defaultResponse
any unknown parameter StringoptionaloptionalAll unknown cgi parameters are set as message properties via setProperty(String, Object) . These properties can then be used by custom transformers or accessed in cgi query logs for reporting purposes.myProp=myValue

(1) The Type column indicates the data type expected for values of the query parameter. If values are specified that are not of this type, the default value will be used instead, unless the parameter is optional, in which case the parameter will be ignored.

(2) The Multi column indicates whether or not the HTTP query parameter can be specified multiple times. For example, since the q.filter parameter is Multi=yes, you can specify it mulitiple times like so q.filter=filter1&q.filter=filter2.

 

Extended Syntax Documentation

Some HTTP GET/POST parameters have more complex syntax. See the links below for full syntax and examples.

Parameter

Documentation

facet

Discrete Facets

rangeFacet

Range Facets

schemaFacet

Schema Facet

fields

Field Expressions

score.function

Field Expressions

  • No labels