Re: [FT] QueryItem & QueryTokenInfo

Paul J. Lucas wrote:
> Hi there -
> 
> From the XQuery and XPath Full Text 1.0 specification, section 4.1.2:
> 
>> A QueryTokenInfo is the identity of a token inside a query string.
> 
> 
> I interpret that to mean that if I were to have a query like:
> 
> 	$x contains text "web site"
> 
> that there would be 2 QueryTokenInfo objects:
> 
> 	QTI-1: word="web", queryPos=1
> 	QTI-2: word="site", queryPos=2

Yup.

> Also from the spec:
> 
>> A QueryItem is a sequence of QueryTokenInfos representing the collection of tokens derived from tokenizing one query string.
> 
> Continuing with the example, I interpret that to mean that I would have 1 QueryItem for the above:
> 
> 	QI: { {word="web", queryPos=1}, {word="site", queryPos=2} }

Yup.

> Hence, for a given query, there would be at most 1 QueryItem ever.

Nope.

> When would there every be more than one QueryItem for a query?
> What does it mean for there to be, say, 2 QueryItems for a query?

E.g.: $x contains text { "web", "site" }

The Expr between the braces yields two query strings, each of which 
corresponds to one QueryItem.

-Michael

Received on Tuesday, 25 May 2010 08:17:22 UTC