Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Oracle Text. Number of hits per document.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
a...@ <""caoimhinocrosbai(at"@  
View profile   Translate to Translated (View Original)
 More options 13 June 2005, 15:52
Newsgroups: comp.databases.oracle.server
From: at\"@ <""caoimhinocrosbai(at\"@)yahoo.com">
Date: Mon, 13 Jun 2005 16:52:20 +0200
Local: Mon 13 June 2005 15:52
Subject: Oracle Text. Number of hits per document.
Hi,

I'm using Oracle 9iR2 and will shortly be replicating this system in
Oracle 10G.

I've just started using an Oracle Context index to perform text searches
on quite a large dataset.

I was wondering if it is at all possible to find out the actual number
of times a certain word was mentioned in a document, as opposed to the
score.

I noticed that as part of the Salton Algorithm, Oracle Text needs to
know the actual number of times a story mentions the search term.   It
seems that this information should be available somewhere in some form.

My queries are normally structured and although count(*) may take a long
time to run, it still does not give me what I want.

Any ideas?

Many Thanks,

Kevin.


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael O'Shea  
View profile   Translate to Translated (View Original)
 More options 13 June 2005, 21:47
Newsgroups: comp.databases.oracle.server
From: "Michael O'Shea" <michael.os...@tessella.com>
Date: 13 Jun 2005 13:47:42 -0700
Local: Mon 13 June 2005 21:47
Subject: Re: Oracle Text. Number of hits per document.
Hi there. From your posted description I believe what you are wanting
cannot be achieved without a kludge on Oracle 9i. The good news however
is that in 10g this is a very simple query. I enclose an example script
trace demonstrating the functionality.
Regards
Mike

TESSELLA   Michael.OS...@tessella.com
__/__/__/  Tessella Support Services plc
__/__/__/  3 Vineyard Chambers, ABINGDON, OX14 3PX, England
__/__/__/  Tel: (44)(0)1235-555511  Fax: (44)(0)1235-553301
www.tessella.com    Registered in England No. 1466429

SQL>
SQL> CREATE TABLE tblTest(id NUMBER,sentence VARCHAR2(300));

Table created.

SQL> CREATE INDEX idxTest
  2   ON tblTest(sentence)
  3    INDEXTYPE IS CTXSYS.CONTEXT
  4     PARAMETERS('SYNC(ON COMMIT)');

Index created.

SQL>
SQL> INSERT INTO tblTest(id,sentence)
  2   VALUES(0,'You will probably file that this feature');

1 row created.

SQL> INSERT INTO tblTest(id,sentence)
  2   VALUES(1,'in Oracle Text is available in Oracle 10g');

1 row created.

SQL> INSERT INTO tblTest(id,sentence)
  2   VALUES(2,'and not in Oracle 9i.');

1 row created.

SQL> INSERT INTO tblTest(id,sentence)
  2   VALUES(3,'This sentence mentions the work Oracle Oracle Oracle
Oracle 4 times.');

1 row created.

SQL> COMMIT;

Commit complete.

SQL>
SQL> SELECT id,
  2   SCORE(5678) AS "CountOracle"
  3     FROM tblTest
  4      WHERE CONTAINS(sentence,'<query><textquery
grammar="context">Oracle</textquery><score datatype="integer"
algorithm="count"/></query>',5678)>0;

        ID CountOracle
---------- -----------
         1           2
         2           1
         3           4

SQL>
SQL> SELECT *
  2   FROM V$VERSION;

BANNER
----------------------------------------------------------------
Personal Oracle Database 10g Release 10.1.0.2.0 - Production
PL/SQL Release 10.1.0.2.0 - Production
CORE    10.1.0.2.0      Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production

SQL> SPOOL OFF


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
a...@ <""caoimhinocrosbai(at"@  
View profile   Translate to Translated (View Original)
 More options 14 June 2005, 08:12
Newsgroups: comp.databases.oracle.server
From: at\"@ <""caoimhinocrosbai(at\"@)yahoo.com">
Date: Tue, 14 Jun 2005 09:12:48 +0200
Local: Tues 14 June 2005 08:12
Subject: Re: Oracle Text. Number of hits per document.

Michael O'Shea wrote:
> Hi there. From your posted description I believe what you are wanting
> cannot be achieved without a kludge on Oracle 9i. The good news however
> is that in 10g this is a very simple query. I enclose an example script
> trace demonstrating the functionality.
> Regards
> Mike

> SQL> SELECT id,
>   2   SCORE(5678) AS "CountOracle"
>   3     FROM tblTest
>   4      WHERE CONTAINS(sentence,'<query><textquery
> grammar="context">Oracle</textquery><score datatype="integer"
> algorithm="count"/></query>',5678)>0;

Thanks for the solution Mike.   That looks perfect, I'll have my Oracle
10G database ready by tomorrow.

Just out of interest, how would one go about doing it in 9i.  I guess by
kludge you mean breaking down the statistical values stored in the $i
table... do you have an example of how to do this?

Many Thanks,

Kevin


    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google