IDOL Server Operations > AgentBoolean Agents and Categories > Perform AgentBoolean Queries

Perform AgentBoolean Queries
After you create or index AgentBoolean categories and agents, you can start querying them.
To match documents that already exist in IDOL server against the categories and agents, use the following actions:
*
AgentGetResults. Returns results for a given agent.
*
CategorySuggestFromDocument. Returns categories that match a given document in IDOL server.
To match IDX or XML documents that do not exist in IDOL server, you can use the following actions with the TextParse parameter:
*
CategorySuggestOnText. Returns categories that match the text you provide.
*
Query. Return documents that match the text you provide.
 
NOTE You must send the Query action to the Agentstore component to return agents or categories.
To perform a TextParse query
1.
Percent encode the content of the IDX or XML document that you want to match against the AgentBoolean agents or categories. For example:
#DREREFERENCE http://www.catdog.com
#DRETITLE Cats and Dogs
#DREFIELD Animal10="dog"
#DREFIELD Animal11="cat"
#DRECONTENT
The organisation takes care of homeless cats and dogs
#DREENDDOC
Percent encoding turns this IDX into this string:
%23DREREFERENCE%20http%3A%2F%2Fwww%2Ecatdog%2Ecom%0D%0A%23DRETITLE%20Cats%20and%20Dogs%0D%0A%23DREFIELD%20Animal10%3D%22dog%22%0D%0A%23DREFIELD%20Animal11%3D%22cat%22%0D%0A%23DRECONTENT%0D%0AThe%20organisation%20takes%20care%20of%20homeless%20cats%20and%20dogs%0D%0A%23DREENDDOC
2.
3.
Send a Query action with the following parameters:
*
Text. Paste the percent-encoded content of the IDX or XML document to match against the AgentBoolean categories.
*
TextParse. Type true to indicate the specified Text is a percent-encoded document in IDX or XML format (it automatically detects the correct format).
*
AgentBooleanField. Type the name of the AgentBoolean field to match against.
*
DatabaseMatch. Type the database that contains agents or categories in the Agentstore component. By default, Agentstore databases are internal, so you must specify them explicitly.
For example:
action=Query&TextParse=true&AgentBooleanField=myABfield&DatabaseMatch=Activated&Text=%23DREREFERENCE%20http%3A%2F%2Fwww%2Ecatdog%2Ecom%0D%0A%23DRETITLE%20Cats%20and%20Dogs%0D%0A%23DREFIELD%20Animal10%3D%22dog%22%0D%0A%23DREFIELD%20Animal11%3D%22cat%22%0D%0A%23DRECONTENT%0D%0AThe%20organisation%20takes%20care%20of%20homeless%20cats%20and%20dogs%0D%0A%23DREENDDOC
This query finds the categories that conceptually match the query text in the Activated Agentstore database. It then checks which of these categories contain a Boolean expression in their myAbfield that the fields in the percent-encoded document match.
 
NOTE IDOL server also returns agents and categories that match the query text and do not contain the AgentBoolean or FieldText field.
IDOL server returns only categories that match the document conceptually and contain a Boolean expression that matches the document fields. For example:
*
IDOL server returns a category that conceptually matches the document if its myABfield contains, for example, one of these Boolean expressions:
cat AND dog
cat:DRETITLE AND dog
*
IDOL server does not return a category that conceptually matches the document if its myABfield contains, for example, one of these Boolean expressions:
cat AND mat
cat AND dog:Animal10
(because Animal10 is not configured as a TextParseIndexType field).
Related Topics 
*