Proposal for a new XQuery and XPath Full-Text Use Case

Scoring at any level in the document is useful when the size of the 
expected result is not fixed and when the content of each result is 
conditional. Large XML documents in particular would benefit from 
functionality like this.
 
Regards,
 
Miro Lehtonen
Department of Computer Science
University of Helsinki
 
Use Case: Query Combining Score and Structure with a Conditional Return
 
Description
-----------
 
Find all books with parts about usability testing.
 
This query finds all the books that contains parts about usability
testing. If a part does not concern usability testing, e.g. it does
not contain the phrase "usability testing", the part element is not 
included in the result.
 
* Operands: "usability testing"
* Functionality: phrase query, implementation-defined scoring, 
  filters on scores, conditional query
* Context: books//content
* Return: books/book
* Comments: This use case is almost like 16.2.5 with scores, but
  the set of conditionally returned elements (content) is fixed. Each part
  element is returned either as a whole or as a summarized version only
  containing the title element. This query type is especially useful when
  dealing with large, volume-sized XML documents consisting of several
  journals each with several articles. The expected results include the 
  full-text of the most relevant articles only, and the other articles are
  shortened. The operands can be words instead of phrases.
 
Expected result
---------------
<book number="1">
   <metadata>
      ...
   </metadata>
   <content>
      <introduction>
         ...
      </introduction>
      <part number="1">
         <title>Expert Reviews</title>
      </part>
      <part number="2">
         <chapter>
            <title>Usability Testing</title>
            <p>Once the problems identified by expert 
            reviews have been corrected, it is time to 
            conduct some tests of the site with your unique 
            audience or audiences by conducting usability 
            testing.</p>
            <p>Users are asked to complete tasks which 
            measure the success of the information 
            architecture and navigational elements of the 
            site.</p>
            <p>Then changes are made to improve service to 
            users.</p>
         </chapter>
      </part> 
   </content>
</book>

Received on Wednesday, 25 February 2004 10:57:49 UTC