Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How does ACCUM work?

GwydionJun 21 2012 — edited Jun 22 2012
Hi there,

I have a problem understanding how ACCUM works. We are using a text index over XML documents and want to apply a very simple relevance weighting based on occurences within a certain tag. For example, if TAG1 has a weight of 10, each occurrence in TAG1 should add 10 to the score. We have 13 Tags that should be weighted and multiple occurences in different tags should be cumulated. So 3 occurences in TAG1 (weight 10) and one occurence in TAG2 (weight 7) should result in a score of 37.

Just searching in TAG1 works as expected:
( DEFINESCORE( foo, OCCURRENCE ) WITHIN TAG1 ) * 10
Three occurences score 30.

Just searching in TAG2 works also as expected. One occurence scores 7. However, when I combine both searches
(( DEFINESCORE( foo, OCCURRENCE ) WITHIN TAG1 ) * 10) ACCUM (( DEFINESCORE( foo, OCCURRENCE ) WITHIN TAG2 ) * 7)
the score is 61 instead of 37. More interestingly, including all 13 tags (of which most do not contain the search word) lowers the score again.

I ended up with searches where two documents containing completely different occurrences of a search word got exactly the same score.
This post has been answered by Roger Ford-Oracle on Jun 21 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2012
Added on Jun 21 2012
7 comments
759 views