home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC65947 Status: Closed

DB2 Text Search: SCORE against XPATH always returns 1

product:
DB2 FOR LUW / DB2FORLUW / 950 - DB2
Problem description:
The scoring function of a full-text search query on XML data 
always scores documents with score value 1, 
no matter how well the document matches the search criteria 
compared to others. 
 
For example, given the following data 
1, <test><title>The forest garden</title><chapter1>The Old 
Forest. Once upon a time the forest spread across all the lands 
south of the mountain, and only few travelers dared to take a 
short cut through the forest. There was no proper road and a 
traveler would </chapter1></test> 
2, <test><title>A squirrel in the tuila 
tree</title><chapter1>Xiri quickly went down the tree to get a 
better look: What was this strange creature doing in the forest? 
It crashed through the bushes and seemed to be oblivious to 
where it was going - it had left a long line of 
</chapter1></test> 
3, <test><title>North and South</title><chapter1>A forest here, 
a forest there, a forest everywhere. The northern forest is dark 
and dense, the southern forest light and</chapter1></test> 
 
 
db2 "select score(content, 
'@xpath:''/test/chapter1[.contains(\"forest\")]''') from 
testtable where contains(content, 
'@xpath:"/test/chapter1[.contains(\"forest\")]''') = 1" 
 
will result in the same score output for all documents, even 
though the search term frequency is different in each document: 
 
1 
------------------------ 
  +1.00000000000000E+000 
  +1.00000000000000E+000 
  +1.00000000000000E+000 
 
  3 record(s) selected.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All Users                                                    * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* DB2 Text Search: SCORE against XPATH always returns 1        * 
*                                                              * 
* The scoring function of a full-text search query on XML data * 
* always scores documents with score value 1, no matter how    * 
* well the document matches the search criteria compared to    * 
* others.                                                      * 
*                                                              * 
*                                                              * 
*                                                              * 
* For example, given the following data                        * 
*                                                              * 
* 1, <test><title>The forest garden</title><chapter1>The Old   * 
*                                                              * 
* Forest. Once upon a time the forest spread across all the    * 
* lands                                                        * 
* south of the mountain, and only few travelers dared to take  * 
* a                                                            * 
* short cut through the forest. There was no proper road and a * 
*                                                              * 
* traveler would </chapter1></test>                            * 
*                                                              * 
* 2, <test><title>A squirrel in the tuila                      * 
*                                                              * 
* tree</title><chapter1>Xiri quickly went down the tree to get * 
* a                                                            * 
* better look: What was this strange creature doing in the     * 
* forest?                                                      * 
* It crashed through the bushes and seemed to be oblivious to  * 
*                                                              * 
* where it was going - it had left a long line of              * 
*                                                              * 
* </chapter1></test>                                           * 
*                                                              * 
* 3, <test><title>North and South</title><chapter1>A forest    * 
* here,                                                        * 
* a forest there, a forest everywhere. The northern forest is  * 
* dark                                                         * 
* and dense, the southern forest light and</chapter1></test>   * 
*                                                              * 
*                                                              * 
*                                                              * 
*                                                              * 
*                                                              * 
* db2 "select score(content,                                   * 
*                                                              * 
* '@xpath:''/test/chapter1[.contains(\"forest\")]''') from     * 
*                                                              * 
* testtable where contains(content,                            * 
*                                                              * 
* '@xpath:"/test/chapter1[.contains(\"forest\")]''') = 1"      * 
*                                                              * 
*                                                              * 
*                                                              * 
* will result in the same score output for all documents, even * 
*                                                              * 
* though the search term frequency is different in each        * 
* document:                                                    * 
*                                                              * 
*                                                              * 
* 1                                                            * 
*                                                              * 
* ------------------------                                     * 
*                                                              * 
*   +1.00000000000000E+000                                     * 
*                                                              * 
*   +1.00000000000000E+000                                     * 
*                                                              * 
*   +1.00000000000000E+000                                     * 
*                                                              * 
*                                                              * 
*                                                              * 
*   3 record(s) selected.                                      * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 9.5 Fix Pack 6 or later.              * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Product is fixed starting with DB2 version 9.5 Fix Pack 6
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
28.01.2010
14.06.2010
14.06.2010
Problem solved at the following versions (IBM BugInfos)
9.5.FP6
Problem solved according to the fixlist(s) of the following version(s)