Open topic with navigation

# Example Queries

This section shows some examples of the different types of queries.

## Agent or Category Query

You can add agent (or category) weights to terms in your query. The IDOL Agentstore component returns documents that contain highly weighted terms with a higher relevance than documents that contain only terms with lower weights. Use the `TermGetInfo` action to find out the weight of the term. Specify weights as a number in brackets next to the term. The maximum weight is `4095`, but Micro Focus recommends that you use a maximum weight of `511`.

For example:

    http://localhost:9050/action=Query&Text=Cat[50] OR Dog

This query returns documents that contain the term cat or the term dog. If the term dog has a higher weight than `50` in Agentstore, documents that contain the term dog return with higher relevance than documents that contain only the term cat. If the term dog has a lower weight than `50`, documents that contain the term cat return with higher relevance.

    http://localhost:9050/action=Query&Text=Cat[30] OR Dog[10]

This query returns documents that contain the term cat or the term dog. Documents that contain only the term cat return with three times the relevance than documents that contain only the term dog.

You can apply term weights to phrases. For example:

    http://localhost:9050/action=Query&Text="cats and dogs"[100]

This query returns documents that contain the phrase `"cats and dogs"` and applies a weight of `100` to this phrase.

You can apply weights to terms in parentheses. In this case, the weight applies to all terms within the parentheses. For example:

    http://localhost:9050/action=Query&Text=(cat OR dog)[100] AND (fish OR dolphin)[150]

This query returns documents that contain at least one of the terms cat or dog, and at least one of the terms fish or dolphin. It assigns the terms cat and dog a weight of `100`, and it assigns the terms fish and dolphin a weight of `150`.

You can use multipliers to multiply the original term weight. Enter a term as `*N`, where `N` is the amount to multiply by. You can use up to two decimal places. For example:

    http://localhost:9050/action=Query&Text=cat[*2.25] OR dog[*0.5]

This query returns documents that contain the term cat or the term dog. The term cat has `2.25` times its normal relevance. The term dog has `0.5` times its normal relevance.

You can also use any combination of these examples to apply term weights to complex phrases or expressions. For example:

    http://localhost:9050/action=Query&Text="cats and dogs"[*3] OR (fish[100]+dolphin[150])[*1.5]

This query applies `3` times the normal weight to the phrase `"cats and dogs"`. It assigns a weight of `100` to the term fish and a weight of `150` to the term dolphin. It then multiplies the weights for fish and dolphin by `1.5`.

## Profile Query

    http://localhost:9050/action=Query&Text= CHAMPIONLEAGU~[551] EVERTON~[407] BAYERN~[402] UEFA~[391] PREMIERSHIP~[383] FIFA~[257] STRIKER~[226] WORLDCUP~[215] EURO~[124] SOCCER~[114] CUP~[66]

This action sends a profile query to the IDOL Agentstore component. The query contains the terms that the profile training contains, and the weight of each of the terms. Agentstore can return agents, profiles, categories, or documents that conceptually match the terms of the query.

## Text Query

    http://localhost:9010/action=Query&Text=Gene analysis discovered methods to determine the exact sequence of nucleotides that compose a specific gene.

This action sends a text query to the IDOL Content component. Content can return agents, profiles, categories, or documents that conceptually match the query text.

## Suggest Query

    http://localhost:9010/action=Suggest&ID=10

This action sends a `Suggest` query to the IDOL Content component. Content can return agents, profiles, categories, or documents that conceptually match the specified document (that is, the document with the ID `10`).

## SuggestOnText Query

    http://localhost:9010/action=SuggestOnText&Text=Gene analysis discovered methods to determine the exact sequence of nucleotides that compose a specific gene

This action sends a `SuggestOnText` query to IDOL Content component. Content can return agents, profiles, categories, or documents that conceptually match the terms with the highest weighting in the query text.

© 2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm