Profiling Engine SDK
API Reference

API
Function List
Topical List
   
 
Query Language
Introduction
Summary
Operators
Tips, Questions, and Answers
   
 
Main Index
Index
Tutorial
API Functions
Query Language
   
Technology Overview
   
Contact Us
   
 
Other Products

Onix Text Search and Retrieval Engine
Brevity Document Summarizer
Lextek Document Profiler & Categorizer
RouteX Document Routing Engine
Lextek Language Identifier
 

prProcessQuery

Name

prProcessQuery

Synopsis

OnixQueryVectorT prProcessQuery( ProfilingEngineT ProfilingEngine, UCharT *Query, StatusCodeT *Status );

Arguments

ProfilingEngine: The profiling object you created with prCreateProfilingEngine.

Query: A NULL terminated string holding the query you wish to execute.

Status: A pointer to a value of type StatusCodeT representing any error conditions.

Returns

OnixQueryVectorT holding the results of your query. This may be NULL if no results were found.

If an error occured, Status will be set to the error number.

Description

prProcessQuery() is called when you wish to analyze a text. It can be called either before or after indexing. Often it is called before indexing to pre-process functions you have defined which apply to any document. After you've indexed a document you call prPRocessQuery() with the name of each category you wish to test the document against.

OnixQueryVectorT is a list of hits that were returned by your query. If you are defining functions, you will have no hits. To see the hits in a vector call prNumHits, prVectorNextRecord, prVectorNextHit, and prVectorCurrentHit.

If you need the vector sorted by weight rather than by record number and word number, you must pass it into prSortVector().

After you have finished with a vector you must dispose of it with prDeleteResultVector().

If there was an error in your query Status will point to the error number. Often the error is due to a mistake in your query. To gain more information about the error call prGetErrorMsg. If there are further descriptions about the error it will return a string with them.

Functions defined by queries are kept by the Profiling Engine until either prDeleteProfilingEngine or prResetProfilerQueryParser is called.

For more information about writing queries, please consult the Query Language Manual.

See Also

prNumHits, prVectorNextRecord, prVectorNextHit, prVectorCurrentHit, prResetProfilerQueryParser