NOTE: This method is now obsolete.
Add a query to the searchCfg object.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public�Sub�addQuery(�_� ���ByVal�query�As�String, �_� ���ByVal�names�As�String()�_� ) |
C# |
---|
public�void�addQuery( ���string�query, ���string[]�names ) |
C++ |
---|
public: �void�addQuery( ���String�query, ���array<String>^�names )�sealed� |
J# |
---|
public�void�addQuery( ���string�query, ���string[]�names ) |
JScript |
---|
public�
function�addQuery( ���query�:�String, ���names�:�String[] ) |
Parameters
- query
- The query that will be used to search the given field names.
- names
- The field names against which the query will be searched (null will search all fields in the table).
Remarks
Queries are specified at the table level. That is, queries cannot span tables. The AddQuery method works by passing a query string and an array of field names (which are field names in the table you are searching) against which to search. You can add as many query / field-name-array pairs as you like. In the simple case, you can use the AddQuery method to restrict those fields against which you want to search (if some fields are non-searchable for instance).
Another good example is the case where you want to search each query against its associated field. That is, imagine you have a table of music with an artist field, album field, and song field. You might have an "advanced" search where you want to search an artist query against the artist field, album query against the album field, and so on. In fact, you can specify any number of queries and any fields you want them to search against. You can even pass multiple searchCfg objects to the search method, allowing you to search multiple tables at the same time.