How to compute a global SCORE over a few oracle text indexed tables?

Dear experts!
I want to search a website with Oracle Text. The website consists of four tables:
- site
- chapter
- text
- binaries
Each table has two or three columns which should be indexed with oracle text. So I have created a MULTI_COLUMN_DATASTORE oracle text index on each table - So I have four indexes on my website.
When I want to search over the website I have to join my 4 tables (4 contain clauses). So how do I get a global SCORE over these 4 contains clauses?
The next question is can I change the weight of my text indexes (useful for the search hit list)? For example the highest weight has the site index, the second highest weight the chapter index and so on?
Thanks
Markus

If it's a simple JOIN, then you could just add the scores for each CONTAINS clause
select score(1)+score(2)+score(3)+score(4)
from table1 t1,table2 t2, table3 t3,table4 t4
where [join conditions]
and contains(t1.col, 'xxx', 1) > 0 or
contains(t2, col, 'xxx', 2) > 0 or
... etc
then to change the weight you just add a multiplying factor.
Can't help thinking it's probably more complex than this, though.

Similar Messages

  • How can i use BAPI to insert a few records  into standard table

    Can anyone help me with how can i use BAPI to insert some records into a standard table from an internal table?

    Hi,
    First of All try to Explain your Question first.
    This is a general question without mentioning the Table you want to Update.
    Please give the details before posting a question  so it will help people to understand your Problem.
    Regards
    Sandipan

  • How to implement the JDBC call over SSL on Oracle?

    I searched the forums and google. It seems to support Oracle 9i JDBC call, Thin driver can not work and we should use OCI.
    I referenced OTN Oracle java example about the SSL, it talked about the security socket but not anythingabout JDBC. http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96573/asoappf.htm#634403
    Who can provide a clear description and resource URL to tell how to make a simple implementation on JDBC over SSL.
    Thanks a lot.

    That article you referenced is referring to the JVM that runs when one runs java stored procedures. It has nothing to do with JDBC.
    You have a unusual requirement (probabaly originated as the same place as your alias.)
    Most of the time SSL is not needed for the database because the database and the applications that talk to it are already on a secured network.
    You can investigate some third party drivers, I believe I recall seeing that one of them does SSL.
    Alternatively you might look into a secure VPN connection. The connection travels over IP and tunnels other traffic through it. Given that the tunned itself is secure, the contents are as well.

  • How to find distinct words in Oracle Text index

    We have a requirement to fetch all distinct words in the CLOB field for all records
    and find the no. of records in which each word appears.
    DR$<Index Name>$I table stores exactly such information. Is it ok to use this table in queries?
    Are there any disadvantages in using it?
    Help is very much appreciated.

    the disadv -
    with every sync index the contents will change.
    with every release the structure may change without any prior information - your application may go bad.
    It is not advisable to use them in your applications. For your own investigation etc you can always use its contents.
    thanks

  • How can i use BAPI to insert a few records into standard table usobt_c

    I needed to compare the records of this table on two different systems and update the records that were in system A but not in system B into system B. Please give your inputs.

    Hi,
    First of All try to Explain your Question first.
    This is a general question without mentioning the Table you want to Update.
    Please give the details before posting a question  so it will help people to understand your Problem.
    Regards
    Sandipan

  • How to get exact match when working with Oracle Text?

    Hi,
    I'm running Oracle9i Database R2.
    I would like to know how do I get exact match when working with Oracle Text.
    DROP TABLE T_TEST_1;
    CREATE TABLE T_TEST_1 (text VARCHAR2(30));
    INSERT INTO T_TEST_1 VALUES('Management');
    INSERT INTO T_TEST_1 VALUES('Busines Management Practice');
    INSERT INTO T_TEST_1 VALUES('Human Resource Management');
    COMMIT;
    DROP INDEX T_TEST_1;
    CREATE INDEX T_TEST_1_IDX ON T_TEST_1(text) INDEXTYPE IS CTXSYS.CONTEXT;
    SELECT * FROM T_TEST_1 WHERE CONTAINS(text, 'Management')>0;
    The above query will return 3 rows. How do I make Oracle Text to return me only the first row - which is exact match because sometimes my users need to look for exact match term.
    Please advise.
    Regards,
    Jap.

    But I would like to utilize the Oracle Text index. Don't know your db version, but if you slightly redefine your index you can achieve this (at least on my 11g instance) :
    SQL> create table t_test_1 (text varchar2(30))
      2  /
    Table created.
    SQL> insert into t_test_1 values ('Management')
      2  /
    1 row created.
    SQL> insert into t_test_1 values ('Busines Management Practice')
      2  /
    1 row created.
    SQL> insert into t_test_1 values ('Human Resource Management')
      2  /
    1 row created.
    SQL>
    SQL> create index t_test_1_idx on t_test_1(text) indextype is ctxsys.context filter by text
      2  /
    Index created.
    SQL> set autotrace on explain
    SQL>
    SQL> select text, score (1)
      2    from t_test_1
      3   where contains (text, 'Management and sdata(text="Management")', 1) > 0
      4  /
    TEXT                             SCORE(1)
    Management                              3
    Execution Plan
    Plan hash value: 4163886076
    | Id  | Operation                   | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |              |     1 |    29 |     4   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T_TEST_1     |     1 |    29 |     4   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | T_TEST_1_IDX |       |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("CTXSYS"."CONTAINS"("TEXT",'Management and
                  sdata(text="Management")',1)>0)
    Note
       - dynamic sampling used for this statementJust read that you indeed mentioned your db version in your first post.
    Not sure though if above method is already available in 9i ...
    Message was edited by:
    michaels

  • I was at a friends and on Itunes on his computer.. with my apple ID i bought some songs. How can i get those songs onto my computer without going back over to my friends house?

    I was at a friends and on Itunes on his computer.. with my apple ID i bought some songs. How can i get those songs onto my computer without going back over to my friends house? They said i have to have his computer and mine in order to get it onto my computer... well... and on my itunes ID is says i bought them in a recent purchase.

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • HT1766 my ipad is disabled how do I start it all over by connecting it to itunes on the computer im having problems

    my ipad is disabled how do I start it alll over by connecting it to itunes on the computer

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • I recently got the iPhone 4s, but my iPod has a lot of apps with a lot of data on them and don't want to start over. I already synced my iPhone from the computer that had all my apps from my iPod, how do i transfer the data over, the other apps did.

    I recently got the iPhone 4s, but my iPod has a lot of apps with a lot of data on them and don't want to start over. I already synced my iPhone from the computer that had all my apps from my iPod, how do i transfer the data over, the other apps did. But some reason the app Clash Of Clans did not. Thank you.

    If I wiped my phone I wouldn't have the contacts on my phone to send to my self.    I would need to take just the contacts from my back up. I would have to do this through iTunes and I don't see how I can just extract the contacts only from my back up. From what I can figure out it is all or nothing

  • How to access my hard drive over the internet?

    Hi,
    I would like to be able to access my hard drive while I am away from my desk. I am not running OS X Server. How can I do this?
    Also, I am behind an Airport Base Station. Which ports would I need to open up?
    Besides my Firewall and my Administrator password, how else can I secure the access?
    thank you....

    VPN does not allow you to control your computer remotely, you are probably thinking of VNC. A VPN essentially extends your local network so that you can access it remotely. You can control your host computer to more than you can control any other computer by accessing it over your LAN.
    I still think a VPN is the best option, but it's not easy to install (MacOS X server has a VPN with a GUI built in). OpenVPN is a great option, and there are several GUI interfaces for it (look for these on www.versiontracker.com). This is best because it is secure and will allow you to access your entire hard drive.
    Like I said in the last post, WebDAV is also an option. This is what a .Mac iDisk is. This will only allow you access a specific folder (or set of folders) that reside in the Apache (var/www) directory. Although you can always make an alias to the apache directory and keep it in your Documents folder.
    A third option that I didn't state before because it's probably the least best is to use NFS to access your home computer. This will allow you to access your entire hard drive. The downside to this is that there is no encryption, nor a password. For security, it uses IP or domain addresses. So this is not an option unless you will to accessing your hard drive from a computer (or a few computers) with (a) static IP address(es).

  • How to get player's score with Adobe's Gaming SDK GameCenter ANE

    Hi! I need your help with something that should be super easy, but I really couldn't find anywhere.
    How do I get local player's highscore with adobe's gamecenter ane, from Gaming SDK? There is a requestScores, but in the only parameter it would make sense to specify the player type (playerScope:String) I only have 2 options to specify (Friends or Global). No option for Local. Default is global..
    When using GameCenter, I want to show the player when he beats his own GameCenter's highscore, and print the current highscore on a results screen when he doesn't beat it. But I can't find anywhere how to get it through this ANE.

    Hi Decco, I would like to show only the player's highscores inside my game, for each leaderboard.
    4morrone, I have the highscore stored in the device, but I would prefer if the player could see his highscores in any device he is logged in. Or if he re-installed the app, for example. When the player beats a level with a new highscore I show him a "New Highscore" screen, which wouldn't be so cool if the local highscore doesn't match his GameCenter score.
    I mean, Its not a really big problem, but I thought it would be easy. It's kind of strange that there is a function to get friends scores, global scores, but not local player's scores (which is a more important information), why would I get friend's GameCenter scores, if I can't compare them to the player's GameCenter score.

  • How to compute group_number efficiently?

    How to compute a group-id efficiently in SQL?
    I have a table with 2 billion rows and need to compute a group-id for each row. As a simplified example, consider the following table.
    Year     Value     Group
    2000     1     1
    2000     2     1
    2000     3     1
    2001     1     2
    2001     3     2
    2001     5     2
    2001     7     2
    2002     4     3
    2002     6     3
    2002     7     3
    2002     12     4
    2002     13     4
    2002     15     4
    The group-id is initially NULL and needs to be computed as follows. Order the table by year and value. The first row gets group id = 1. Then
    (a) any time the year changes, that row is assigned the next higher group id.
    (b) any time the year does not change but the value of the preceding row differs by more than 2 from the current row, then the current row is assigned the next higher group id.
    (c) otherwise, the row is assigned the same group id as the preceding row.
    I have a PL/SQL procedure with performs this computation. Works fine. But was unable to find a SQL command to do it. Looked for an analytic function to provide a group number similiar to how row_number works, and was unable to find such a function.
    The first try was something like the following (to find the rowid and new group id prior to issuing the update). Nextval and currval were not allowed in this context, and moreover, the logic depends on an ordering which is probably not guaranteed.
    with lagged as (
    select year, value, rowid rid,
    row_number() over (order by year, value) rn,
    lag(value,1,value) over (order by year, value) oldvalue
    from T)
    select rn, year, value, rid,
    (case
    when abs(value-oldvalue) > 2
    then mysequence.nextval
    else mysequence.currval
    end) indicator
    from logged
    The next try was to assign values of 1 or 0 (in place of nextval and currval). This worked but required a follow-on pass to compute the cumulative sum, and that made the operation significantly more expensive.
    Any suggestions on how to efficiently compute the group-id?

    Even if the subquery output was not sorted, the over clause give us the insurance to be processed in the specified order.
    You can just run a test by adding an order clause in the subquery to see that the result is same (note that's just for test, you'll may some perf problem if you add it with real data) :
    SCOTT@demo102> select year,
      2          value,
      3          case when value-lag(value, 1, value-3) over (partition by year order by year, value) > 2
      4               then 1 end value_rn
      5   from mytable
      6   order by value, year;
          YEAR      VALUE   VALUE_RN
          2000          1          1
          2001          1          1
          2000          2
          2000          3
          2001          3
          2002          4          1
          2001          5
          2002          6
          2001          7
          2002          7
          2002         10          1
          2002         12
          2002         13
          2002         15
          2002         22          1
          2003         22          1
    16 rows selected.
    SCOTT@demo102> select year, value,
      2         sum(value_rn) over(order by year,value) sum_rn
      3  from
      4  (select year,
      5          value,
      6          case when value-lag(value, 1, value-3) over (partition by year order by year, value) > 2
      7               then 1 end value_rn
      8   from mytable
      9   order by value, year); --just to test
          YEAR      VALUE     SUM_RN
          2000          1          1
          2000          2          1
          2000          3          1
          2001          1          2
          2001          3          2
          2001          5          2
          2001          7          2
          2002          4          3
          2002          6          3
          2002          7          3
          2002         10          4
          2002         12          4
          2002         13          4
          2002         15          4
          2002         22          5
          2003         22          6
    16 rows selected.
    SCOTT@demo102> Nicolas.

  • How do I Port a Number over?

    I haven't gotten my iphone yet, it's still in the mail, but I want to have everything ready so that I can get it workign ASAP. How do I port a number over from a verizon phone to the iphone and what can I do to make the process easier? Thanks in advance.

    I Just got an iPhone yesterday and finished the activation around 3:30 P.M. and got this email:
    *Congratulations, AT&T is now transferring your existing mobile number to this iPhone.*
    *Your iPhone mobile number will be:*
    *Your iPhone may now make outgoing calls but will be unable to receive calls on your existing mobile number until the transfer is complete.*
    *You will receive an email confirmation once your mobile number transfer is complete. If you have not done so already, please connect your iPhone to your computer now to complete this activation.*
    Its been about 19 hours and the number still hasnt been ported over. Who should I call to see what the problem is?

  • How can I transfer my contacts over to a new Apple ID?

    How can I transfer my contacts over to a new Apple ID?

    Please explain?
    Your contacts should be on your computer.
    Not sure what you are asking.

  • How can I move my left over money from my UAE account into USD for my American itunes account?

    How can I move my left over money from my UAE account into USD for my American itunes account?

    How can I go back to my US account then?? I only have .03 aed left..

Maybe you are looking for