The search
Command
This Search API command performs searches on the Exalead CloudView index. It is available at
http://SEARCH_API_HOST:SEARCH_API_PORT/search-api/search
. You can use it
from the Java SearchClient and the .NET SearchClient classes.
Global Parameters
sl or logic
- String, monovalued.
- Must reference a valid logic, defined in the search logics list.
Example: print the query ast and not the ellql
q=job&sl=sl0 q=job&logic=sl0
st or target
- String, monovalued.
- Must reference a valid search target
Example: print the query ast and not the ellql
q=job&st=st0 q=job&target=st0
c or context
The context contains the encoded version of previous arguments to chain queries.
d or debug
Turns on various debugging flags for this query.
Value is a comma-separated list of the following parameters:
Parameter | Description |
---|---|
query
|
Logs query parsing and execution info |
synthesis
|
Logs synthesis info |
ph
|
Logs partial hit info (for example, scoring/collapsing keys) |
fh
|
Logs full hit info (metas, hit categories) |
ast
|
Puts the query ast in answer info |
ellql
|
Puts the ellql in answer info (enabled by default) |
context
|
Puts the context in answer info (enabled by default) |
executor
|
Puts the executor in answer info. When a query execution requires several executions (disjunctive facets refinements, spell) they are all displayed. |
all
|
All of the above |
qp:int
|
queryprocessing debug level (0 to 3=all) |
-
prefix. Example: print the
query ast
and not the ellql
d=ast,-ellql
Example: print everything except the logs full
hit info (fh
)
d=all,-fh
Example: print
everything except the context
(context
)
d=all,-context
hit_infos; hit_info, hi
Puts additional info in the hit to debug the ranking. The following info is supported:
Parameter | Description |
---|---|
ast
|
Computes the index AST for each hit. |
rankings
|
Displays the ranking keys for each hit. |
all
|
All of the above |
-
" prefix.Example: search for word "vacation" and enable ranking info for ast. You can cumulate the options.
q=vacation&hi=ast q=vacation&hi=ast,rankings
applicationId
In V6.x, you can create multiple applications using the Mashup Builder. This parameter is the Mashup application ID passed by the API client.
Important: It is also required by the Business Console, since the Business Logic is directly embedded as a prelinguistic Business Processor into the Search Server. |
To trigger the Business Processor at runtime, you have to pass the
applicationId
parameter and optionally, the
stagingMode
parameter:
Parameter | Description |
---|---|
applicationId
|
Represents your application identifier (for example, "default") |
stagingMode
|
Accepts two values:
|
Examples:
-
http://SEARCH_API_HOST:SEARCH_API_PORT/search-api/search?q=test&applicationId=default&stagingMode=false
- The Business Processor uses the "default" application configuration and precompiled resources. -
http://SEARCH_API_HOST:SEARCH_API_PORT/search-api/search?q=test&applicationId=default&stagingMode=true
- The Business Processor uses the "default" application configuration and compile resources at query-time. -
http://SEARCH_API_HOST:SEARCH_API_PORT/search-api/search?q=test&applicationId=default
- The Business Processor will use the "default" application configuration and precompiled resources. -
http://SEARCH_API_HOST:SEARCH_API_PORT/search-api/search?q=test
- The Business Processor is not triggered.
Checkpoints
The list of checkpoint values to retrieve on each slice, stored in the answer's slice info.
Value is a comma-separated list of checkpoint names.
Origin
This parameter has no impact on query treatment. However, it is logged in the
search.csv
file and can help you identify the origin of the query,
when you analyze user queries using the search-reporting reporter
with a CSV publisher. It is useful for better traceability and debugging.
Sorting and Grouping Parameters
s or sort
Sort is declared through several parameters:
Parameter | Description |
---|---|
sort=STRING
|
Comma-separated list of asc([sort id]) or
desc([sort id]) , that defines the order of the hits. |
s=STRING
|
Same as sort . |
sort.[sort id].expr=STRING
|
An existing index field, an existing virtual field or a
symbolic name, used to compare hits. Set to [sort id] by
default. |
sort.[sort id].lsb=INTEGER
|
Position of the least significant within
[0,63] to be considered. For integer field only.
0 by default. |
sort.[sort id].msb=INTEGER
|
Position of the most significant within
[lsb,63] to be considered. For integer field only.
63 by default. |
sort.[sort id].limit=INTEGER
|
Maximum number of byte used to compare character string.
0 means that the strings are compared till the end.
0 by default. |
sort.[sort id].min=INTEGER
|
If the field is an integer, only keeps hits for which the expr is at least INT. |
Example: sort alphabetically by region and then by price
s=asc(document_region),desc(document_price)
Example: sort alphabetically by increasing price, decreasing score and then by increasing file size. 'myprice' and 'myscore' are '[sort id]' [sort id] can not contain any space, or comma, or closing parenthesis, nor point. If such characters are required, use the expanded syntax.
s=asc(myprice),desc(myscore),asc(document_file_size) s.myprice.expr=price-discount s.myscore.expr=@term.score*@proximity*#round(document_double,4)
Example: sort by color index defined on 4 bits in the index field
document_bitfield
.
s=asc(color) s.color.expr=document_bitfield s.color.lsb=12 s.color.msb=15
is the same as: s=asc(document_bitfield[12:15])
The following syntax is also supported for backward compatibility. It allows only mono field sort.
-
s=field
- Sort descending on field. -
s=-field
- Sort ascending on field. -
s=field[lsb,msb]
- Sort descending on field, restricted to a given bitrange. -
s=-field[lsb,msb]
- Sort ascending on field, restricted to a given bitrange.
Group
Theses parameters control the GroupBy feature.
Parameter | Description |
---|---|
group=[group id], ...
|
Comma-separated list of one or more [group
id] . Each element stands for an independent group passed on the
result set. |
group.[group id].by=[criterion id], ...
|
Comma-separated list of one or more field names or
expressions used to group hits. Set to [group id] by
default. |
group.[group id].by.[criterion id].expr=STRING
|
Field name or expression used to group hits. Set to
[criterion id] by default. |
group.[group id].by.[criterion id].lsb=INTEGER
|
Position of the least significant within
[0,63] to be considered. For integer field only.
0 by default. |
group.[group id].by.[criterion id].msb=INTEGER
|
Position of the most significant within
[lsb,63] to be considered. For integer field only.
63 by default. |
group.[group id].by.[criterion id].limit=INTEGER
|
Maximum number of byte used to compare character string.
0 means that the strings are compared till the end.
0 by default. |
group.[group id].aggregation=[aggr id],...
|
Comma-separated list of one or more aggregation names. |
group.[group id].aggregation.[aggr id].function=POLICY
|
Score actions that combine the ranking value for a group.
POLICY is one of SUM , MAX ,
MIN , AVG , STDDEV ,
CONCAT . MAX by default. |
group.[group id].aggregation.[aggr id].expr=STRING
|
Field name or expression that contain the data to be
aggregated. Set to [aggr id] by default, you can omit it when
expr is equal to the [aggr id]
|
group.[group id].aggregation.[aggr id].separator=STRING
|
Sequence on characters placed in-between the concatenated values. |
group.[group id].aggregation.[aggr id].aggregationField=STRING
|
Name of the field or expression where the aggregation result
is written. It can then be used to be displayed (combined with
add_hit_meta ) or to perform sort (combined with
sort ) for example. |
group.[group id].topn=INTEGER
|
Number of hits to keep for each group. |
group.[group id].sort=STRING
|
Defines the order of hits within each group to keep the top
n best. See sort= . |
group.[group id].s=STRING
|
Same as group.[group id].sort . See
sort= . |
group.[group id].sort.[sort criterion id].*
|
Sort criterion parameters. See
sort= . |
By default, a group pass has a single group dimension defined with expr set to
[group identifier]
. [group id]
and
[criterion id]
can neither contain comma, nor point. If such
characters are required in the expression, use the expanded syntax.
Example: Keep one document for each state. The best one is selected according to the ranking sort, the others are discarded.
group=document_region
Example: Keep the five best documents for each state.
group=document_region group.document_region.topn=5
Example: Same as previous, but uses a label to identify the group rather than the field name.
group=byRegion group.byRegion.by=document_state group.byRegion.topn=5
Example: Keep the best noted hit per region, sort regions per hit count, and display the count. This example relies on the constant virtual expression 1.
group=document_region group.document_region.aggregation=1 group.document_region.aggregation.1.function=SUM group.document_region.sort=desc(document_note) sort=desc(1) add_hit_meta=1
is the same as:
add_virtual_field=count:1 group=document_region group.document_region.aggregation=count group.document_region.aggregation.count.function=SUM group.document_region.sort=desc(document_note) sort=desc(count) add_hit_meta=count
Example: Keep no more than five hit per region, and no more that eight times the same
product. This configuration creates two independent collapsing passes. The result set
may contain fewer than 5 hits per region because document_product_name
removes hits of the groups made by document_region
pass.
group=document_region,document_product_name group.document_region.topn=5 group.document_product_name.topn=8
Example: Keep one record for each firstname, lastname pair, select most recently
updated hit, and get the average note in document_note
and the total
expense in total_expense
. Finally results are sorted
alphabetically.
group=byPerson group.byPerson.by=document_firstname,document_lastname group.byPerson.s=desc(document_lastupdatedate) group.byPerson.aggregation=document_note,document_price group.byPerson.aggregation.document_note.function=AVG group.byPerson.aggregation.document_price.function=SUM group.byPerson.aggregation.document_price.aggregationField=total_expense sort=asc(document_lastname),asc(document_fisrtname) add_hit_meta=document_note add_hit_meta=total_expense
Collapsing (DEPRECATED)
collapsing
parameters are supported for backward compatibility. Prefer
group
parameters.
Parameter | Description |
---|---|
collapsing
|
Comma-separated list of group identifiers. Each element stands for an independent collapsing passed on the result set. For each group, the
following |
collapsing.[group identifier].expr=STRING
|
Field name or expression used to group hits. Set to
[group identifier] by default. |
collapsing.[group identifier].lsb=INTEGER
|
Position of the least significant within
[0,63] to be considered. For integer field only.
0 by default. |
collapsing.[group identifier].msb=INTEGER
|
Position of the most significant within
[lsb,63] to be considered. For integer field only.
63 by default. |
collapsing.[group identifier].limit=INTEGER
|
Maximum number of byte used to compare character strings.
0 means that the strings are compared till the end.
0 by default. |
collapsing.[group identifier].nbhits=INTEGER
|
Number of hits to keep for each group. |
collapsing.[group identifier].action.[virtual
expression]=POLICY
|
Score actions that combine the ranking values for a group.
POLICY can be add , max , min
or best . For each grouping key, there can be one action for
each ranking element. best by default. |
Example: Keep one document for each state. The best one is selected according to the ranking sort, the others are discarded.
collapsing=document_region
Example: Keep the five best documents for each state.
collapsing=document_region collapsing.document_region.nbhits=5
Example: Same as previous but uses a label to identify the group rather than the field name.
collapsing=byRegion collapsing.byRegion.expr=document_state collapsing.byRegion.nbhits=5
Example: Keep one hit per region, sort regions per hit count, and display the count. This example relies on the constant virtual expression 1.
collapsing=document_region collapsing.document_region.action.1=add sort=desc(1) add_hit_meta=1
Example: Keep no more than five hits per region, and no more that eight times the same
product. This configuration creates two independent collapsing passes. The result set
may contain fewer than 5 hits per region because document_product_name
remove hits of the groups made by document_region
pass.
collapsing=document_region,document_product_name collapsing.document_region.nbhits=5 collapsing.document_product_name.nbhits=8
User Query
q or Query
- string in UQL format
- Parameter name can be in the form q.X to define a named query.
Example:
q=olympic games query=olympic games
eq or ellql_query
- string in ELLQL format
- Parameter name can be in the form eq.X to define a named query.
Example: search for olympic games in text field
eq=#alphanum(text, "olympic games")
qt or query_template
- String, in the form of an ELLQL tree, defining how to combine the named queries
- Default value:
#and(#query(_default_) #query(restriction) #query(security) #query(refine))
- If a named query does not exist, it is replaced by a
!NoOp()
node and therefore ignored.
Security, enforce_security
- Adds a security token, multivalued.
- Used to increase the auto-built disjunction in the "security" named query.
- By default, security tokens generate category lookups on the "security" field.
-
enforce_security=true|false
globally enables or disables security.
Example: search for word "secured" in text field with security enabled and security token provided
q=secured&enforce_security=true&security=unix:user:10125
l or lang
- string, monovalued
- The global query ISO language.
- This parameter does not restrict searches to documents in this language. It only controls the language used for computing linguistic expansions, spell checking, and summarization.
Example: search for word "vacation" in text field in English language
q=vacation&l=en
r or refine
- Adds a refinement.
- The combination of refines which creates a named query called "refines".
Example: search for word "vacation" in text field and refine on source category "corpus"
q=vacation&r=f/source/corpus
cr or cancel_refine
Cancels a refinement completely.
Example: search for word "vacation" in text field, refine on source category "corpus" and cancel this refine
q=vacation&r=f/source/corpus&cr=f/source/corpus
zr or zap_refine
Removes a refinement and refines on the father, if applicable. For example, if we have refinement on "Top/MyPath/A/B/C", zapping this refinement replaces it with a refinement on "Top/MyPath/A/B"
Example: search for word "vacation" in text field, refine on source category "corpus" and zap this refine.
q=vacation&r=f/source/corpus&zr=f/source/corpus/english
handle_unknown_refine_as_false
If true
, when a r=f/unknownfacet/refine
is specified,
returns 0 results rather than an error. Default: false
UQL Interpretation
dp or default_prefix
Sets the default prefix handler. The default value is the one specified in the search
logic. Can be restricted to a particular named query using
dp.NAMED_QUERY_NAME
or
default_prefix.NAMED_QUERY_NAME
.
Example: search for word "vacation" and set default prefix handler to "title", so "vacation" is searched in the title field.
q=vacation&dp=title
qec,query_expansion_config
Sets the QueryExpansionConfig for a given prefix.
The argument name can be specified as:
Parameter | Description |
---|---|
qec=SPEC
|
Sets the QEC of the default prefix |
qec.PREFIX=SPEC
|
Sets the QEC on a given prefix |
qec.ALL=SPEC
|
Sets the QEC on all semantic prefixes |
q.QUERY.qec=SPEC
|
Sets the QEC on a named query |
q.QUERY.qec.PREFIX=SPEC
|
Sets the QEC on a given prefix only on a named query |
The argument value (SPEC
) is specified as a QEC specification.
Examples:
-
name=spellslike spec=phonetic
-
name=text spec=synonyms1
-
name=spells2 spec=phonetic{m=3}
-
text:spellslike:foo will do phonetic + synonyms1
-
text:spellslike:spell2:foo will do phonetic{m=3} + synonyms1
pal or patterns_all_languages
Sets whether pattern expansions are performed in all languages (Boolean parameter).
Limits Parameters
Limits
Defines search limits. This parameter is specified as a KV Map.
The basic keys are:
-
max_fetched_hits
-
max_fetched_hits_per_slice
-
max_query_time
-
max_total_time
-
hits_sampling
Advanced keys are:
-
max_kept_hits
-
main_heap_flush_interval
-
slice_heap_flush_interval
-
interrupt_grace_delay
-
full_grace_delay
Detailed documentation of these parameters can be found in SearchLogic / LimitsConfig in XML Configuration Reference
Example: Override timeout and limits
limits=max_total_time:0&limits=max_query_time:n&limits=max_fetched_hits_per_slice:0
Timeout
Shortcut for the limits parameter. When you want to set a timeout, unlike the
max_total_time
parameter, the timeout=X
parameter
also sets the value of max_query_time
parameter.
-
timeout=INT
- Sets the global timeout. Query timeout is 75% of the global value. -
timeout=INT,INT
- Sets the query and global timeouts.
nhits
Shortcut for limits=max_kept_hits:INT
hf or full_hits,nresults
Number of full hits. hf=0
disables full hits fetch.
b or start
First full hit index. For example, to search on the:
- first page:
b=0&hf=10
- second page:
b=10&hf=10
Hit Meta Parameters
use_logic_hit_metas
-
true
/false
- (Optional) Removes all metas defined in the search logic. Default istrue
. -
metaname1,metaname2,metaname3
- Keeps only this list of metas. Be careful they must exist in search logic unlessallow_unknown_hit_meta
istrue
.
allow_unknown_hit_meta
Optional:
Allows you to set an unknown meta in the list provided in
use_logic_hit_metas
, which is silently discarded. Default is
false
.
add_hit_meta
Add a new hit meta to the query result. Use multiple add_hit_meta
clauses to add multiple metas. The value is a list of key:value separated by commas:
key:value | Description |
---|---|
name:string
|
The name of the meta |
index_field:string
|
Name of the index field used to retrieve the meta value
from, when different from the meta name. Default is name .
|
multi_field:string
|
Name of the index multiple fields (a.k.a. csv field) used to retrieve the values. |
dynamic_field:string
|
Name of the index dynamic field used to retrieve the values. |
context_name:string
|
For dynamic_field use only, specify the
context to extract from the dynamic field. If empty, it is assumed that
context_name has name value |
highlight:boolean
|
When true, the meta value is highlighted in the summary. false by default. |
summarize:boolean
|
false by default. |
select_values:boolean
|
This parameter only works for value and alphanum fields. It allows you to configure the number of values displayed for metas in hit content. This is typically useful to restrict the number of values retrieved from multivalued fields when you do not want to clutter hit content with too many values for a given meta. You can specify a min and a max values to this operation with the
add_hit_meta=name:bar,index_field:foo,select_values:true,max_values:N This operation uses the query to determine whether a given value is a match
or not, you therefore have to add another parameter like
Note:
If the property has no value
matching
value_to_match , you lose a search
result. |
index_field
, multi_field
,
dynamic_field
are exclusive. By default the meta value is extracted
from an index_field
with the same name as the meta. Dynamic fields, and
multi fields contain multiple keys and values, the values matching the meta name are
returned. There is a compact syntax for add_hit_meta
that
supports only index_fields
and highlighting:
-
name
- Name of the index field -
name,hl
- Name of the index field, highlight:Boolean
Example: Simplified syntax
add_hit_meta=document_field_name,hl
is the same as:
add_hit_meta=index_field:document_field_name,highlight:true
Example: Extracts color and value from the dynamic property named
document_dynamic_field
.
add_hit_meta=dynamic_field:document_dynamic_field,name:color& add_hit_meta=dynamic_field:document_dynamic_field,name:value
Example:
You could also extract color from the dynamic property named
document_dynamic_field
and output its value in meta named property
using a virtual expression:
add_hit_meta=dynamic_field:document_dynamic_field,name:property,context_name:color
To use a virtual expression in a hit meta:
-
hit_meta.name.expr=expr
- wherename
can contain any character, andexpr
is a virtual expression.
Add meta specific operation:
- First, you have to define the type of your operation, using the following syntax:
(add_)hit_meta.META_NAME.operation.OPERATION_ID.type
- Then, you can associate properties to a given operation:
(add_)hit_meta.META_NAME.operation.OPERATION_ID.property.OPERATION_PROPERTY
The following tables list available properties associated by type:
Type | Properties |
---|---|
custom
|
|
date_format
|
output_format:string - default is %m/%d/%Y
|
highlight
|
|
printf
|
output_format:string
|
snippet
|
Makes a single value of a meta shorter when at least one of the meta's values
matches. The typical use case for This operation uses the query to determine whether a given value is a match
or not, you therefore have to add another parameter like
Note:
If the property has no value
matching
value_to_match , you lose a search
result.
|
standard_decoding
|
|
time_format
|
|
truncate
|
|
Example: Adds a meta hello from the field document_polite
with
a truncate processor named truncate_hello
with max_length=10,
strict=true
add_hit_meta=name:hello,index_field:document_polite& hit_meta.hello.operation.truncate_hello.type=truncate& hit_meta.hello.operation.truncate_hello.property.max_length=10& hit_meta.hello.operation.truncate_hello.property.strict=true
add_hit_metas
Extract all values from a multivalued field. It applies to multi fields (a.k.a. csv fields) and dynamic fields. The value is a key:value list separated by comma.
For dynamic fields only, you can also:
- Select a subset of contexts if you specify match rules (available rules: "exact",
"prefix", "suffix", "substring"). You have to use them as key, the associated value
being the pattern you are looking for. Note: You can associate several rules. In this case, the hit meta is displayed if its name matches at least one rule.
- Specify the name of the meta that receives all the content of the dynamic field. If not set, for each pair key:value stored in the field, a meta named as the key is created.
Parameter | Description |
---|---|
multi_field:string
|
Name of the index field used to retrieve the meta names and values. Used by default. |
dynamic_field:string[,ruleA:pattern,ruleB:pattern,ruleC:pattern][,name:string]
|
Name of the index field used to retrieve the meta names and values, optional match rules, optional output meta name. |
Simplified syntax when the type of field is not specified
multi_field
is assumed.
Example: simple syntax
add_hit_metas=document_csv_field
is the same as:
add_hit_metas=multi_field:document_csv_field
Example: dynamic field (displays all contexts)
add_hit_metas=dynamic_field:document_dynamic_field
Example:
dynamic field with exact match rules (displays toto_first
and
toto_second
but not toto_third
)
add_hit_metas=dynamic_field:document_dynamic_field,exact:toto_first,exact:toto_second
Example:
dynamic field with prefix rules (displays toto_first
and
toto_second
but not titi_first
)
add_hit_metas=dynamic_field:document_dynamic_field,prefix:toto_
Example:
dynamic field with name (if dyn_[first:value1 first:value1]
and
dyn_[second:value2 second:value2]
are stored, displays
metagroup:value1,value2
)
add_hit_metas=dynamic_field:document_dynamic_field,prefix:dyn_,name:metagroup
remove_hit_meta
In the search logic, metas are identified by their names
in the HitConfig
object. When you remove a meta, this removes all
sources and all processors attached to this meta. Value = meta name
add_highlight
Highlights an existing meta. Value = meta name
add_summary
Summarizes an existing meta. Value = meta name
hit_meta_order
Comma-separated list specifying in which order to display metas. Applicable only to CSV output.
All metas not present in the list are displayed after the metas present in the list.
did
, url
,
buildGroup
, source
, slice
,
score
, mask
, sort
Faceting Parameters
Synthesis
- enabled/disabled
- Defaults to search logic config value.
synthesis_hits
- Number of hits used for category synthesis.
- Defaults to the value in the search logic.
use_logic_facets
Specifies the search logic facets to use and disables all other facets. For the specified facets, the configuration is read in the search logic.
-
true
- keeps all (default value) -
false
- removes all -
facet_id1,facet_id2,...,facet_idN
- keeps only this list of facets
remove_facet
One argument: facet_id
.
f.* or facet.*
Creates a facet. Facets are specified as multiple parameters, like
facet.FACET_ID.key=value
where FACET_ID
is the facet
id (_a-zA-Z0-9
).
Key | Description |
---|---|
type
|
Specifies the facet type (default is
category ), which can be:
|
min_docs:long
|
Min number of docs that have the facet value (default is
1 ) |
max_elements:uint
|
Max number of categories (default is 0=unlimited) |
max_per_slice
|
Specifies the max number of different facets returned by a single slice. |
in_hits:boolean
|
Default is true
|
in_synthesis:boolean
|
Default is true
|
sort
|
Specifies the sorting function (default is
count ), which can be:
To reverse the sorting order, prefix the sorting function with
|
sort_agg_fun: string
|
Sort aggregation function id. (requires
sort=aggregation ) |
explicit_sort_order_values: string
|
Comma-separated list of values defining the explicit sort
order. Note:
You also need to configure properly
sort parameter
to use this feature. |
implem
|
Implementation must be cpu ,
mem or auto . (default is
auto ) |
refinement_policy:string
|
Refinement policy exclusive ,
disjunctive or norefine . (default is
exclusive ) |
Key | Description |
---|---|
form:string
|
exact /lowercase /normalized
(default is normalized ) |
root:string
|
Required |
field:string
|
Category field (Required) |
max_depth:uint
|
Max depth from refine (default is
0 =unlimited) |
max_depth_from_root:uint
|
Default 0 =unlimited |
max_per_level:uint
|
Default 100
|
Example: Standard facet with aggregation - Use this for the default Exalead CloudView index schema, which includes a categories field.
f.common_facet.type=category f.common_facet.root=Top/ClassProperties/facetmut3 f.common_facet.field=categories f.common_facet.aggr.total=SUM(doc_int1)
Example:
Dedicated facet with aggregation - Use this if you have added another category type
field (in this case, stdf3
) to your index schema.
f.stdf3.type=category f.stdf3.root=Top f.stdf3.field=stdf3 f.stdf3.aggr.total=SUM(doc_int1)
Key | Description |
---|---|
vroot: string
|
(Required) |
field
|
(Required) the value field to use. |
Example:
f.valf3.type=value f.valf3.vroot=Top/ f.valf3.field=valf3 f.valf3.aggr.total=SUM(doc_int1)
f.cod_ente.type=value f.cod_ente.vroot=Top/ f.cod_ente.field=cod_ente f.cod_ente.aggr.total=SUM(anno_ruolo)
Key | Description |
---|---|
vroot:string
|
(Required) |
enum_facet_[if:string if:string]
|
(Required) enum facet identifier |
Key | Description |
---|---|
vroot:string
|
(Required) |
expr:string
|
(Required) |
start:string
|
CONSTANT virtual expression that evaluates to the time when the synthesis starts |
end:string
|
CONSTANT virtual expression that evaluates to the time when the synthesis ends |
before_start:bool
|
Creates a virtual category for all dates before start
(default is false ) |
after_end:bool
|
Creates a virtual category for all dates after end (default
is false ) |
year:bool
|
Creates a virtual category for each (default is
true ) |
year_desc:bool
|
Defines sort order for year (default is
true ) |
month:bool
|
Creates a virtual category for each month (default is
true ) |
month_desc:bool
|
Defines sort order for month (default is
false ) |
week:bool
|
Creates a virtual category for each week (default is
false ) |
week_desc:bool
|
Defines sort order for week (default is
false ) |
day:bool
|
Creates a virtual category for each day (default is
true ) |
day_desc:bool
|
Defines sort order for day (default is
false ) |
hh:bool
|
Creates a virtual category for each hour (default is
false ) |
hh_desc:bool
|
Defines sort order for hour (default is
false ) |
mm:bool
|
Creates a virtual category for each minute (default is
false ) |
mm_desc:bool
|
Defines sort order for minute (default is
false ) |
ss:bool
|
Creates a virtual category for each second (default is
false ) |
ss_desc:bool
|
Defines sort order for second (default is
false ) |
max_depth:int
|
Default is 0
|
max_depth_from_root:int
|
Default is 0
|
Key | Description |
---|---|
vroot:string
|
(Required) |
expr:string
|
(Required) |
missing_intervals:boolean
|
Generates the missing intervals ensuring the dates are contiguous |
year_fmt:string
|
Defines year-based generated category format |
quarter_fmt:string
|
Defines quarter-based generated category format |
month_fmt:string
|
Defines month-based generated category format |
week_fmt:string
|
Defines week-based generated category format |
day_fmt:string
|
Defines day-based generated category format |
hour_fmt:string
|
Defines hour-based generated category format |
min_fmt:string
|
Defines minute-based generated category format |
sec_fmt:string
|
Defines second-based generated category format |
enable_year:boolean
|
Enables the year level |
enable_quarter:boolean
|
Enables the quarter level |
enable_month:boolean
|
Enables the month level |
enable_week:boolean
|
Enables the week level |
enable_day:boolean
|
Enables the day level |
enable_hour:boolean
|
Enables the hour level |
enable_min:boolean
|
Enables the minute level |
enable_sec:boolean
|
Enables the second level |
enable_iso8601:boolean
|
Enables the iso8601 norm for date representation |
Virtual numerical facets are used to organize search results in ranges.
Key | Description |
---|---|
num_explicit
|
Create ranges manually |
num_fixed
|
Create ranges that are the same size |
num_dynamic
|
Create ranges automatically |
Key | Description |
---|---|
vroot:string
|
(Required) |
expr:string
|
(Required) see Virtual Expression Syntax reference page. |
range
|
(0 to N times) min,max,title , for example
"-1,1,my title " |
min:double
|
Default is 0
|
max:double
|
Default is 2^63
|
lsb:int
|
Default is 0
|
msb:int
|
Default is 63
|
default_precision:int
|
Default is 2
|
Key | Description |
---|---|
rsize:double
|
Range size (def 0=one range per distinct value). |
below_min:bool
|
Creates a range for values below min. |
above_max:bool
|
Creates a range for values above max. |
fmt_range
|
Sets the range title format. |
fmt_above
|
Sets the above title format. |
fmt_below
|
Sets the below title format. |
fmt_single
|
Sets the singleton title format. |
Key | Description |
---|---|
fmt_range
|
Sets the range title format. |
nb_ranges:int
|
The maximum number of ranges to output (dynamic). |
policy:enum
|
The policy to generate the ranges. |
adjust_ranges:bool
|
Tries to adjust the ranges on multiples of 10 (deprecated). |
more_accurate:bool
|
Better linear/geometrical ranges, but slower (deprecated). |
mrsize:bool
|
Size of each bin used to compute cardinality. |
exclusiveRightBracket:bool
|
In the case of dynamic ranges, this parameter determines if
the facet is exclusive or inclusive from the right side (true
means [a,b[, and false means [a,b]) |
Example: Define custom price ranges and titles for each range
f.price.type=num_explicit f.price.vroot=Top/Price f.price.expr=document_dbl1 f.price.range=0,1000,0to1000euros f.price.range=1000,2000,1000to2000euros f.price.range=2000,4000,Tooexpensiveforyou
Key | Description |
---|---|
vroot:string
|
(Required) |
field:string
|
(Required) the point field to use for synthesis |
domain
|
(0 to N times) a domain specification:
|
Key | Description |
---|---|
vroot: string
|
(Required) |
field
|
(Required) the PointField to use |
xmin, xmax, ymin, ymax
|
Parameters defining the facet with X and Y coordinates for
the global geographic query. xmax and ymax
define the Max envelope of the geographic facet. |
xbin, ybin
|
Parameters defining the size of the tile (with X and Y absolute coordinates) within the global geographic query scope. |
Key | Description |
---|---|
id1:string
|
(Required) |
id2:string
|
(Required) |
vroot: string
|
(Required) |
ds: boolean
|
With dimension switch (default is false )
|
sec_sort: string
|
Secondary sort function. Same syntax as
sort . (default is count ) |
sec_sort_agg_fun: string
|
Secondary sort aggregation function id |
sec_explicit_sort_order_values: string
|
Comma-separated list of values defining the secondary explicit sort order |
f.mycompany_facet1.type=value f.mycompany_facet1.vroot=Top/ f.mycompany_facet1.field=mycompany_facet1 f.mycompany_facet2.type=value f.mycompany_facet2.vroot=Top/ f.mycompany_facet2.field=mycompany_facet2 f.mat.type=matrix f.mat.vroot=Top/ f.mat.id2=mycompany_facet1 f.mat.id1=mycompany_facet2 f.mat.aggr.total=SUM(mycompany_int1) f.mycompany_facet1.max_elements=10 f.mycompany_facet2.max_elements=10
Key | Description |
---|---|
vroot: string
|
(Required) |
additional_tree_representation: bool
|
Generate the tree representation |
additional_tree_representation_ds: bool
|
Generate the tree representation with the extra dimension separator |
f.id.dim.prop
|
Specifying MultiFacetDimensions for MultiDimensionFacets can be done with the
|
f.id.aggr.aggId=FCT(xpr)
|
Adds an aggregation function with id aggId
and expression expr
|
f.heat_consump_apt.type=multi f.heat_consump_apt.vroot=Top/heat_consump_apt f.heat_consump_apt1.id=location_code f.heat_consump_apt2.id=heating_type f.heat_consump_apt.additional_tree_representation=true f.heat_consump_apt.aggr.conso=SUM(consumption_statement) f.heat_consump_apt.in_hits=false
Dynamic Search Target
st.* or target.*
Defines a search target. The search target is specified with multiple parameters, like
st.TARGET_NAME.key=value
or
target.TARGET_NAME.key=value
where TARGET_NAME
is
the search target name (_a-zA-Z0-9).
The following keys are supported by all search targets:
-
type:string
- "local
", "simple
" -
watch_dog_connect_timeout_ms:int
-
watch_dog_read_timeout_ms:int
The local search target supports the following key:
build_groups:string
The simple search target requires the definition of target slices. Target slices are
specified with multiple parameters, like
st.TARGET_NAME.target_slices.TARGET_ID.key=value
or
target.TARGET_NAME.target_slices.TARGET_ID.key=value
where
TARGET_NAME
is the search target name (_a-zA-Z0-9) and
TARGET_ID
is a number (0-9). The following keys are supported:
-
build_groups:string
-
slices:string
-
instances:string
-
power:int
Examples:
st=my_dynamic_search_target st.my_dynamic_search_target.type=local
st=my_dynamic_search_target st.my_dynamic_search_target.type=local st.my_dynamic_search_target.watch_dog_connect_timeout_ms=1000 st.my_dynamic_search_target.watch_dog_read_timeout_ms=5000 st.my_dynamic_search_target.build_groups=bg0
st=my_dynamic_search_target st.my_dynamic_search_target.type=simple st.my_dynamic_search_target.target_slices.0.build_groups=bg0
st=my_dynamic_search_target st.my_dynamic_search_target.type=simple st.my_dynamic_search_target.watch_dog_connect_timeout_ms=1000 st.my_dynamic_search_target.watch_dog_read_timeout_ms=5000 st.my_dynamic_search_target.target_slices.0.build_groups=bg0 st.my_dynamic_search_target.target_slices.0.slices=0,1 st.my_dynamic_search_target.target_slices.0.instances=my_instance st.my_dynamic_search_target.target_slices.0.power=0 st.my_dynamic_search_target.target_slices.1.build_groups=bg1 st.my_dynamic_search_target.target_slices.1.slices=42 st.my_dynamic_search_target.target_slices.1.instances=my_instance st.my_dynamic_search_target.target_slices.1.power=1
Textual Relevance Parameters
Relevance
Boolean parameter to enable all relevance computation.
Globally disabling relevance computation disables the following features:
- term scoring
- proximity scoring
- sorting
- node properties
- using ranking elements for faceting
- using ranking elements for facet aggregations
- retrieving ranking elements
true
.true
. proximity_max_distance
Maximum distance for proximity matching.
ts (term score)
Sets the term score algorithm. Value must be one of the available algorithms:
- NO_RANKING
- RANK
- TFIDF
- IDF
- RANK_IDF
- RANK_TFIDF
- BM25
- BM25F
- CUSTOM - for this term score algorithm, you must define
ts.expr
to specify the custom expression.
Unranked search mode
Streaming
Boolean parameter. If true
, all sorts and all limits are ignored.
The answer is NOT cacheable, and is streamed. It is efficient as the synthesis and full hits are computed on-the-fly. It is therefore especially adapted to fetch large results sets without much memory consumption.
In streaming mode, you must iterate over all returned hits, so do not use the
getHits()
method but getHitsIterator()
instead, and
read hits using the hasNext
and next
subcalls.
hf
parameter does not control the maximum
total number of returned full hits, but the maximum number of returned hits per slice.
Therefore, with 4 slices, streaming=true
, hf=2000
, up
to 8000 hits can be returned. allow_skip_nhits
Boolean parameter. If true
, Exalead CloudView stops counting hits that match the query as soon as
possible. The nhits
value is allowed to be incorrect.
This advanced parameter must be used for high performance unranked exports without synthesis.
Search Logic Editing
Search API parameters are the preferred way to change the search logic at query time.
Yet, when modifications made to the search logic are not covered by standard Search API parameters, the *search logic editing* (a.k.a. sle) can be used as a generic way to set, add, or remove values in the search logic.
Unlike Search API parameters, the sle upward compatibility is not guaranteed. Any change made to the search logic during product upgrade may affect the sle.
Add an sle
It is possible to add one or more sle to the search URL with the following query parameters:
-
set:[path]=[new value]
- wherepath
identifies the object field or list element to be replaced by the new value. The previous value is deleted.Example: The following example set the
performMAX
Boolean of the query prefix handler namedprofiles
totrue
sle=set:uQLConfig.queryPrefixHandler[name="profiles"].performMAX=true
-
add:[path]=[new list element]
- wherepath
identifies the list element before which the new value is inserted. The list element and any subsequent elements are shifted to the right.Example: Add a full text prefix handler
sle=add:uQLConfig.queryPrefixHandler=FullTextPrefixHandler (name="t",indexFields="title",dictionaryName="dict0",matchingMode="normalized")
-
remove:[path]
- wherepath
identifies the list element to be removed. The element is deleted and any subsequent elements are shifted to the left.Example: Remove the first operation of meta named "title"
sle=remove:hitConfig.meta[name="title"].metaSpecificOperation[0]
Value serialization
*value serialization* depends on the type.
Value type | Description |
---|---|
null
|
The null value |
boolean
|
true and false
|
integer
|
Digits optionally preceded by a minus sign. For example,
314 , -5
|
double
|
Floating point value. For example, 3.14 ,
-.5 , 1.23E9
|
string
|
Sequence of characters between double quotes. Double quotes
have to be escaped with \" . For example,
"abc" , "say \"hello\""
|
list
|
Sequence of values separated by commas, between brackets.
For example, [1, 42, 5] , ["a","c"]
|
object
|
Serialization of a new object. For example,
SortBy(name="myobject",expr="title",limit=100,order="asc")
|
- values
"5"
and5
are not equivalent. The first is a string whereas the second is an integer. - values
""
andnull
are not equivalent. The first is an empty string whereas the second is a null value.
sle Path
The *path* is an element sequence that identifies either an object field or a list element.
The XML representation of the search logic is not representative. There may be missing nodes or case discrepancy.
The path must be built using the
javadoc
sdk/java-customcode/docs/api/com/exalead/mercury/mami/search/v20/SearchLogic.html
.
Parameter | Description |
---|---|
hitConfig.meta[name="title"]
|
Stands for the first element with name equal to
"title" in the meta list of the hitConfig
object in the Search Logic. |
virtualFieldDefinition[0]
|
Stands for the first element of the
virtualFieldDefinition list in the Search Logic. |
Object serialization
The *object serialization* is made of two parts:
[class](key=value, ...)
-
The java class identifier can either be the full qualified name of a java class using
.
as package separator and'$'
for inner classes. For convenience, the simple class name is accepted, and the full name is deduced from the path.For example,
com.exalead.search.v30.VirtualFieldDefinition
orVirtualFieldDefinition
-
The initializers is a comma-separated sequence of assignment.
For example,
SnippetOperation(highlightFacetIds="Event,Person",highlightExtraPrefixHandlers="soundslike,spellslike", maxSentenceSegmentLength=210,maxLength=500)