In a more advanced
application, users can search against multiple properties with multiple terms.
To do this,
Ntk
and
Ntt
are used together.
You can implement searching multiple properties using
AND
Boolean logic with
Ntk
and
Ntt
with the following query:
Ntk=<property_key1>|<property_key2> Ntt=<search_term1>|<search_term2>
In this query, each term is evaluated against the corresponding property. The returned record set represents an intersection of the multiple searches.
Example 60. Examples of searching multiple terms
For example, assume that a search for the term
cherry
returns 5,000 records while a search for
peach
returns 2,000 records.
However, a multiple search for both terms:
<application>?N=0&Ntk=Description|Description&Ntt=cherry|peach
returns only 10 records if those 10 records are the only records in which both terms exist in the Description property.
You can use any number of property keys, as long as it matches the number of search terms.
For example, consider the following records:
Rec ID |
Dimension value (Wine Type) |
Name property |
Description property |
---|---|---|---|
1 |
Red (Dim Value 101) |
Antinori Toscana Solaia |
Dark ruby in color, with extremely ripe... |
2 |
Red (Dim Value 101) |
Chateau St. Jean |
Dense, rich, and complex describes this California... |
3 |
White (Dim Value 103) |
Chateau Laville |
Dense and vegetal, with celery, pear, and spice flavors... |
4 |
Other (Dim Value 103) |
Jose Maria da Fonseca |
Big, ripe, and generous, layered with honey... |
In this example, the following query:
<application>?N=0&Ntk=Description|Name&Ntt=Ripe|Solaia
returns only record 1.
The following query:
<application>?N=0&Ntk=Description|Name&Ntt=Ripe
is invalid, because the number of record search keys does not match the number of record search terms.
You can also use search interfaces to perform searches against multiple properties. For more information, see the section about search interfaces. For information about performing more complex Boolean queries, see topics about using Boolean search.