Direct News Queries

See Also

 

 

 

Direct News Queries are a class of query techniques used when your workstation is accessing the Aspen Graphics server directly.

 

A news query enables you to search news headlines for a particular word or combination of words.

 

All search commands begin with a forward-slash (/) character.

 

Don't spend a lot of time digesting the functionality described below. It is about to change radically with the advent of JNews. For more information, click here.

 

News databases are maintained on servers and standalone systems, not on workstations. Workstation users access a server's news database.

 

Simple Queries

The simplest form of search command consists of a forward slash followed by a word. For example,

 

/Dow

/Greenspan

/China

 

The news database indexes stories by the words in each story's headline. Some data vendors broadcast keywords with each news story, and you can query for data vendor keywords as well.

 

Aspen Graphics evaluates all queries as lower case textual strings: it does not recognize words per se. The effect of this is that any criterion may produce undesired results. For example, if to find all headlines on a December contract, you use the query,

 

/Dec

 

Aspen Graphics evaluates the query as the textual string "dec." If the headlines containing the words "decline," "decimate," "decry," as "deception," as well as "December" exist, all will be included in the resulting headline list. You can mitigate the effect of this phenomenon by using the exclamation point (!) limiter in the query.

 

! Limiter

The exclamation point limiter (!) causes Aspen Graphics to evaluate a news query criterion literally.  For example, the following query,

 

/Dec!

 

returns only those headlines that contain the textual string "dec." Aspen Graphics uses the "padding," or spaces, before and after a text string to identify valid matches.

 

Narrowing Searches with News Categories

News categories are classes of headlines with common subject. To select a news category, choose News Categories from the News menu. Then, select a category.

 

News categories vary from feed to feed.

 

The contents of news category list can be further refined by searching for story headlines containing one or more words (or word fragments).

 

Once a category and/or query has been processed, the headline list is updated real-time with any new story that falls into the current category and meets current search criteria.

 

A news window's selected category and current search query (if any) are always saved with the window when the window (or the page to which it belongs) is saved.

 

Advanced Queries

A query is either simple or compound.  A simple query, as explained above, consists of a single search word.  A compound query element contains two or more search words joined by operators. (The number of operators is always one less than the number of elements.)

 

When a query is evaluated, each search word in the query is used to derive a list of all news headlines that contain a match. As suggested above, a simple query looks for headlines containing a single word. A compound query, on the other hand, consists of two or more words joined by operators. When multiple search words are given, an equal number of lists are derived during query evaluation. Then, these lists are combined using the rules associated with the query operators.

 

Every query (simple or compound) yields a list of news headlines.

 

 

The query elements comprising a compound query element may, in and of themselves, also be compound query elements (because any query element can be simple or compound).  This gives rise to the notion of nested query elements, which is discussed later.

 

News Query Operators

There are three query operators available for use in search queries:

 

Operator

Function

&

AND

,  

INCLUSIVE OR

%

EXCLUSION

 

The ampersand (&) character represents the AND operation.  This operation is commutative. It is a set intersection operator, where the contents of the two lists are compared and only those elements present in both lists are included in the result list.

 

The comma (,) character represents an INCLUSIVE OR operation.  This operation is commutative. INCLUSIVE OR is a set union operator, where the contents of two lists are merged into one result list that contains everything present in the two original lists, but without duplication of common elements.  

 

The percent sign (%) represents the EXCLUSION operation. This operation is not commutative. It is a set difference operator, by which any elements of the first list which occur in the second list are "removed" from the first, leaving only those items which were different in the result list. In other words, it reduces the contents of the first list by excluding any elements also found in the second list.  This produces a result list which is hopefully smaller (that's the intent) but will never be larger than the first list.  The exclusion operator creates an exclusion filter, removing any headlines in the first list that also appear in the second list.  In other words, it allows the query to specify what stories are not wanted in the query results. This is often useful to trim a few extraneous stories from an otherwise satisfactory but slightly too inclusive search query.

 

Each of the three operators has a different intrinsic precedence level, with the AND operator being highest and the EXCLUSION operator being lowest in precedence.  This precedence makes query interpretation like our natural use language.  For example, the query,

 

Bush, Budget & Talk

 

would be evaluated by combining the match-lists derived from "Budget" and "Talk" and then combining that result with the match-list derived from "Bush".  The higher precedence of the ‘&’ operator causes it to be evaluated first.  Explicitly grouped, the query would appear as:

 

Bush, (Budget & Talk)

 

As before, this search query would match headlines containing "Bush" as well as headlines containing both "Budget" and "Talk".  In other words, the query would produce a list of stories about anything involving Bush as well as stories about the Budget talks.  To override the default precedence and evaluation order, parentheses could be used as follows:

 

(Bush, Budget) & Talk

 

This search query would match headlines containing "Bush" as well as "Budget", if the search keyword "Talk" also matched each of those headlines.  In other words, the query would produce a list of stories about Bush talking as well as stories about the Budget talks.

 

Order of Operation

Aspen Graphics lets you create complex queries.  Generally speaking, a complex query is any query that employs multiple criteria and two or more Boolean operators. When writing such queries, you can specify the order in which the criteria are evaluated by placing parentheses () around those criteria you want evaluated first, as in writing a formula.

Aspen Graphics evaluates first criteria or criterion in parentheses. Nesting parentheses causes Aspen Graphics to evaluate first the criteria or criterion in the innermost set of parentheses, as in writing a formula.

 

For example,

 

/(wheat,corn)%oats

 

Here, the query returns headlines containing wheat and corn. This query first finds all headlines containing the words "wheat" or "corn," and then the query eliminates any headlines containing the word "oats."

What to look for in the next release (JNews)

Enlarged News History

6 months minimum on news history (limitations imposed by news contributors).

 

SQL Based Searching

Search Type

Function

+ searches

A leading plus sign indicates that this word must be present in each news headline or keyword.

 

– searches

A leading minus sign indicates that this word must not be present in each news headline or keyword

.

“ phrase searches

If a phrase is enclosed in double quotes, only news headlines or keywords that match the phrase literally, as it was typed will be returned.

 

* Wildcard searches

An asterisk comes at the end of the word it modifies.  It works like a wildcard matching any words that start with the specified word.

 

() Parenthesis to Group

sub-expressions

 

Relevance Operators

Operator

Function

<> relevance values

These 2 operators change a word’s contribution to the relevance value assigned to the search.  The < operator decreases the contribution. The > operator increases the contribution.

 

~ negation operator

This inverts the words relevance.  It is useful for removing words that are very common, thus get high relevance, but it does'’t completely remove them from the search.

 

Examples:

 

Query

Result

crude light oil

At least one of these words

 

+crude +oil

Both words

 

+oil –massage

oil but not massage

 

crud*

 Any word that starts with "crud", crude, crudely, crud

 

 "brent crude oil"

"Brent crude oil prices today", but not "brent oil crude"

 

+brent crude

Must contain the word brent, but rank it higher if it also contains the word crude

 

+brent +(>crude <oil)

brent and crude and brent and oil, but rank brent crude higher than brent oil