How to give more relevance to one of the column in multi-column data store

Hi gurus,

When using multi-column datastore necessary to give more importance to one of the other column. How can we achieve the same?
SQL > create table test_sh4 (text1, text2 clob clob);

Table created.

SQL > alter table test_sh4 Add (Text3 clob);

Modified table.

SQL > start
2 ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
3 ctx_ddl.set_attribute
4 ("nd_mcd",
5 "columns."
6 ' replace (Text1, "", "") nd, Text1 text1, replace (Text1, "", "') nd, Text1 text1');
7 ctx_ddl.set_attribute ('nd_mcd', 'separator', 'new line');
8 ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
9 ctx_ddl.set_attribute ('test_lex1', 'spaces', ' /--------|-_ + "");
10 end;
11.

PL/SQL procedure successfully completed.

SQL > create index IX_test_sh4 on test_sh4 (Text3)
indexType is ctxsys.context
parameters
("nd_mcd of the data store
lexer test_lex1')
/ 2 3 4 5 6

Index created.
Here, while querying how can I give more relevant for the text1 Text2 column as column?

I gave an example below. I added some data to your example. You had tags and columns duplicated in your multi_column_datastore, so I fixed it those. I removed the newline delimiter and added a section with sections of field group and add this section to the index settings group. Allows you to search in each section of field and apply different fats. You can apply weights by multiplying by a value entre.1 and 10 or several times multiplier to reduce or increase the score for a particular section.

SCOTT@orcl_11gR2> -- table structure you provided:
SCOTT@orcl_11gR2> create table test_sh4 (text1 clob,text2 clob);

Table created.

SCOTT@orcl_11gR2> alter table test_sh4 add (text3 clob);

Table altered.

SCOTT@orcl_11gR2> -- added data:
SCOTT@orcl_11gR2> insert all
  2  into test_sh4 (text1, text2, text3)
  3    values ('testword', 'word2', 'word3')
  4  into test_sh4 (text1, text2, text3)
  5    values ('word4', 'testword', 'word5')
  6  into test_sh4 (text1, text2, text3)
  7    values ('test word', 'word2', 'word3')
  8  into test_sh4 (text1, text2, text3)
  9    values ('word4', 'test word', 'word5')
 10  select * from dual
 11  /

4 rows created.

SCOTT@orcl_11gR2> -- fixed duplicate column names and tags and
SCOTT@orcl_11gR2> -- removed newline delimiter and
SCOTT@orcl_11gR2> -- added section group with field sections:
SCOTT@orcl_11gR2> begin
  2    ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
  3    ctx_ddl.set_attribute
  4        ('nd_mcd',
  5         'columns',
  6         'replace (text1, '' '', '''') nd1,
  7          text1 text1,
  8          replace (text2, '' '', '''') nd2,
  9          text2 text2');
 10    ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
 11    ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+');
 12    ctx_ddl.create_section_group ('test_sg', 'basic_section_group');
 13    ctx_ddl.add_field_section ('test_sg', 'text1', 'text1', true);
 14    ctx_ddl.add_field_section ('test_sg', 'nd1', 'nd1', true);
 15    ctx_ddl.add_field_section ('test_sg', 'text2', 'text2', true);
 16    ctx_ddl.add_field_section ('test_sg', 'nd2', 'nd2', true);
 17  end;
 18  /

PL/SQL procedure successfully completed.

SCOTT@orcl_11gR2> -- added section group to index:
SCOTT@orcl_11gR2> create index IX_test_sh4 on test_sh4 (text3)
  2  indextype is ctxsys.context
  3  parameters
  4    ('datastore     nd_mcd
  5        lexer          test_lex1
  6        section group     test_sg')
  7  /

Index created.

SCOTT@orcl_11gR2> column text1 format a10
SCOTT@orcl_11gR2> column text2 format a10
SCOTT@orcl_11gR2> column text3 format a10
SCOTT@orcl_11gR2> -- without weighting:
SCOTT@orcl_11gR2> select score (1), t.* from test_sh4 t
  2  where  contains
  3             (t.text3,
  4              'testword',
  5              1) > 0
  6  /

  SCORE(1) TEXT1      TEXT2      TEXT3
---------- ---------- ---------- ----------
         6 testword   word2      word3
         6 word4      testword   word5
         3 test word  word2      word3
         3 word4      test word  word5

4 rows selected.

SCOTT@orcl_11gR2> -- with weighting:
SCOTT@orcl_11gR2> select score (1), t.* from test_sh4 t
  2  where  contains
  3             (t.text3,
  4              '(testword within text1) * 10 or
  5            (testword within nd1)     *  5 or
  6            (testword within text2) * .5 or
  7            (testword within nd2)     * .1',
  8              1) > 0
  9  order  by score (1) desc
 10  /

  SCORE(1) TEXT1      TEXT2      TEXT3
---------- ---------- ---------- ----------
        48 testword   word2      word3
        20 test word  word2      word3
         2 word4      testword   word5
         1 word4      test word  word5

4 rows selected.

Tags: Database

Similar Questions

  • How to reject records that are incompatible with the definition ODI 11 g data store?

    Buenas tardes.

    Como puedo girls los looking than any stupid fulfil the definition of length of atributos as hay in el data do not store? For example, in a process of integration llega a cuyo campo has a length of 50 characters first_name registro, pero base datos solo supports 40 characters. ODI in este falla y being the run y yo Necesito UN than rechace este registro y con continue the run. How I can control this event?

    Of photos muchas gracias.

    Hello

    Ah yes, I forgot about it.

    You can fool ODI by changing the logical length of the column in the data store in the model.

    In this way the I$ table will have a length of more than time and you won't have the problem.

    Kind regards

    JeromeFr

    PS: Your English is above the average on this forum, don't you worry. Most of us is not English-speaking.

  • How to pass more than 3 Articles in the column link

    Hello
    I need to spend 4 elements as values of link from page 1 to page 2. Under report-> column attributes
    Attributes-> link I can't put more than 3 Articles. Can some please advice the best way to transmit more than 3 values from page 1 to page 2.

    Thanks in advance
    Aali

    More than 1 point/value can be entered in each text box: just, separate them by commas (",") and to ensure that the order of elements and values matches.

  • How can I fix this error message, the address has not been understood Firefox doesn't know how to open this address, because one of the following values for protocols (connectag

    We have a new computer and I can't get my watch running from garmin for synchronization with mozilla. The error message I get is "address not was heard.

    Firefox doesn't know how to open this address, because one of the following protocols (connectagent) is not associated with any program or is not allowed in this context.

       You might need to install other software to open this address."
    

    Help please

    Hi grranchgirl, if you have an "Always enable" and "never activate?

    I don't know if the terms 'modern' and 'classic' mean anything to you, but there is a thread on the Garmin forums that might be useful - it is very long and I didn't read it all.

    https://forums.Garmin.com/showthread.php?79956-modern-Garmin-connect-mostly-doesn-t-work-in-both-Firefox-and-chrome & p = 330634 #post330634

  • I am installing CC on an iMac late 2015. I get the following error message: Firefox doesn't know how to open this address, because one of the following protocols (aam) is not associated with any program or is not allowed in this context.      You mi

    I am installing CC on an iMac late 2015. I get the following error message: Firefox doesn't know how to open this address, because one of the following protocols (aam) is not associated with any program or is not allowed in this context.      You may need to install additional software to open this address. "Someone knows what's going on?

    Please try to download from: https://helpx.adobe.com/creative-cloud/help/install-apps.html. You can also try to download using the different browser.

  • How can I pass/add these results in the column of the motion of my hand

    Hello Experts

    I'm working on a subquery. My subquery works very well and gives the results I need. But how do I pass/add these results in the column of the motion of my hand "MGRNAME". Here's my query

    Select pc.c_id 'Project ID',
    CN. C_ID 'Customer ID', cn.c_last "Last Name", "First Name", cn.c_first
    PJ.mgr_id 'ID Manager', 'Project', MGRNAME pj.project_name
    project_consultant PC
    Join them consultant cn
    on (pc.c_id = cn.c_id)
    Join the pj project
    on (pc.p_id = pj.p_id)
    where lower (cn.c_last) = "myers.

    and MGRNAME in
    (select concat (substr (c_last, 1, 20),
    substr (c_first, 1, 20))
    as consultant MGRNAME
    where c_id in (102, 103)
    )

    When I run the above query, I got error.

    Many thanks in advance
    SELECT pj.p_id         "Project ID",
           cn.c_id         "Client ID",
           cn.c_last       "Last Name",
           cn.c_first      "First Name",
           pj.mgr_id       "Manager ID",
           pj.project_name "Project",
           SUBSTR (mgr.c_last, 1, 20) || ' ' || SUBSTR (mgr.c_first, 1, 20) AS mgrname
      FROM project_consultant pc,
           consultant cn,
           project pj,
           consultant mgr
     WHERE pc.c_id = cn.c_id
       AND pc.p_id = pj.p_id
       AND pj.mgr_id = mgr.c_id
       AND mgr.c_id IN (102, 103)
       AND LOWER (cn.c_last) = 'myers';
    

    isotope

  • How to cut the column data

    Gurus in the morning

    I have two tables with the data in the corresponding column, BUT I need to cut the columns in a table
    the data is displayed as follows in table xpq_log
    LOG_DATE                     LOG_PTR     LOG_HDR
    01/06/2011 00:00:00     0609pro     0609IN002C_06
    04/06/2011 00:00:00     0609pro     0609IN002C_06
    05/06/2011 00:00:00     0609pro     0609IN002C_06
    06/06/2011 00:00:00     0609pro     0609IN002C_06
    07/06/2011 00:00:00     0609pro     0609IN002C_06
    09/06/2011 00:00:00     0609pro     0609IN002C_06
    10/06/2011 00:00:00     0609pro     0609IN002C_06
    12/06/2011 00:00:00     0609pro     0609IN002C_06
    01/06/2012 00:00:00     0609pro     0609IN002C_06
    02/06/2012 00:00:00     0609pro     0609IN002C_06
    03/06/2012 00:00:00     0609pro     0609IN002C_06
    06/06/2012 00:00:00     0609pro     0609IN002C_06
    07/06/2012 00:00:00     0609pro     0609IN002C_06
    08/06/2012 00:00:00     0609pro     0609IN002C_06
    09/06/2012 00:00:00     0609pro     0609IN002C_06
    In the table of printpdf as follows
    PDF_REPORT     PDF_DESCRIPTION
    IN002C                     STOCK FILE PURGE - PRINT WH CONTROL
    How can I cut the column data (log_hdr) to match column (pdf_report)?

    Any help will be much appreciated

    user11978142 wrote:
    Yes the code always starts with an alphabetic character and always ends before the underscore character and the prefix is always digital.

    And Yes to the second comment WRT 1 to many relationship.

    WRT the duplicates I want the info displayed even if there is no matching printpdf

    You talk a LEFT OUTER JOIN, then:

    See the example below (the statement are just to reproduce the paintings, just use the last query):

    WITH xpq_log AS
    (
       SELECT '0499SYS003A_06' log_hdr FROM DUAL UNION ALL
       SELECT '0612PV410W1_06' log_hdr FROM DUAL UNION ALL
       SELECT '0609IN002C_06' log_hdr FROM DUAL UNION ALL
       SELECT '2201PA100D1_30' log_hdr FROM DUAL
    )
    , printpdf AS
    (
       SELECT 'SYS003A' pdf_report, 'STOCK FILE PURGE - PRINT WH CONTROL' description FROM DUAL UNION ALL
       SELECT 'PV410W1' pdf_report, 'Description 2' description FROM DUAL
    )
    SELECT a.log_hdr, REGEXP_SUBSTR (a.log_hdr, '[[:alpha:]][^_]*') AS pdf_report
         , b.description
      FROM xpq_log a LEFT OUTER JOIN printpdf b
           ON pdf_report = REGEXP_SUBSTR (a.log_hdr, '[[:alpha:]][^_]*');
    
    Output:
    LOG_HDR        PDF_REPORT     DESCRIPTION
    -------------- -------------- -----------------------------------
    0499SYS003A_06 SYS003A        STOCK FILE PURGE - PRINT WH CONTROL
    0612PV410W1_06 PV410W1        Description 2
    2201PA100D1_30 PA100D1
    0609IN002C_06  IN002C                                           
    

    Kind regards.
    Al

  • How to query start a new line in the column?

    How to query start a new line in the column?

    Exam

    SELECT ID, username | host name, details of xxx;

    on the 2 column, I need result below:

    Username ID | hostname in detail
    1 user1 xxxxxx
    host1
    2 user2 xxxxxx
    host2

    Kind regards
    Suradech

    Something like that?

    SQL> WITH tbl AS (SELECT 1 id,'user1' uname,'xxx' dtl,'host1' hname FROM DUAL UNION ALL
      2               SELECT 2 id,'user2' uname,'yyy' dtl,'host2' hname FROM DUAL UNION ALL
      3               SELECT 3 id,'user3' uname,'zzz' dtl,'host3' hname FROM DUAL
      4               )
      5  SELECT id,uname||dtl||chr(10)||hname FROM tbl;
    
            ID UNAME||DTL||CH
    ---------- --------------
             1 user1xxx
               host1
    
             2 user2yyy
               host2
    
             3 user3zzz
               host3
    
  • How to use c:if condition check in the column to display the value

    I'm working on Jdeveloper11g with the table of the ADF.

    UseCase: in one of the column I use the condition such that if the value is not null then use golink otherwise display fair value (in fact, it is nothing). I mean I should be using golink if there is a value for this line. I tried with below but without success.

    Let me know the solution.

    < af:column sortProperty = "docName" sortable = "true".
    headerText = "#{res}" >
    < c:if test = "${docName.length > 0}" >
    "< af:goLink destination =" #{row.docURL} "text =" #{row.docName} ".
    targetFrame = "_blank" / >
    < / c:if >
    < af:outputText value="#{row.bindings.docName.inputValue}"/ >
    < / af:column >

    Thank you
    Katie

    Katie,

    You can do this by using switch or by using the visible property.
    The use of switcher:

    
         
          
              
          
          
              
          
         
    
    

    The visible property using:

    
         
         
    
    

    Jean Lou

  • How did each service assigned to one of the many instances of svchost on startup?

    You use Process Explorer frequently, and I noticed that when the pointer is placed on one of the many svchost processes, there are at least twelve bodies. Procexp displays a tip listing the services it supports, the number of items listed for each instance is different between these instances of active significaltly. Manager tasks indicates that the statistics for the active instances vary widely between these instances. I tried to answer this part of the question myself, but I have not find any instanceswithonoy service except fot some where the [Stop] button is not active.

    The registry entry for each service can contain a value that specifies the group to which it belongs. The groups are listed in the registry key HKLM\System\CurrentControlSet\Control\ServiceGroupOrder.

    The Service Control Manager maintains a database of services and services start-up control.

    You can change the group to which belongs a service or specify that it runs in its own service host using the sc config command. Forcing service is running in an isolated host can be useful in debugging a problem.

    http://TechNet.Microsoft.com/en-us/library/cc990290 (WS.10) .aspx

  • VMs migration from one to another on ESXi 5.1 data store (free license)

    I'm under ESXi in my lab (for the Cisco voice servers and a few Windows virtual machines). Virtual machines are on a datastore iSCSI hosted by a Netgear ReadyNAS Pro Business. Due to major problems with iSCSI on the ReadyNAS platform and the inability of Netgear to resolve problems (blocking NAS requiring a hard reset), I decided to buy a QNAP TS - 569 L and use it to host my ESXi data store. Now, I'm migrating my VMs from the iSCSI data store hosted on the ReadyNAS to the iSCSI data store hosted by QNAP.

    My VMs are supplied thin, and I want to preserve thin provisioning after migration. The data store Navigator ESXi can move (or copy) machines virtual data to another store, but thin-set in service virtual machines become thick-set service once they have been moved (or copied). Somebody advised Veeam to that end, I've installed and configured. Unfortunately, Veeam-error with the message that the current license does not have the migration of virtual machines from a data store to another. Just today, I learned that he must have at least the ESXi Essentials ($500) license to allow this type of migration of Veeam.

    I also tried OVFTool (the MMware command line utility), using the following syntax:

    . / ovftool - ds QNAP-iSCSI - dm = vi thin: / / vi [email protected]/CUCM-Pub: / / [email protected]

    where:

    QNAP-iSCSI is the name of the data store on the QNAP

    192.168.200.10 is the IP address of my box of ESXi that is connected to two data stores iSCSI (the one organized by the ReadyNAS and the other by the QNAP).

    CUCM-Pub is the name of the virtual machine on the ReadyNAS iSCSI data store I'm migrating to the QNAP iSCSI data store.

    However, I get the following error message:

    Error: Unexpected Option: vi: / / [email protected]/CUCM-Pub

    This is probably due to the same issue - free ESXi license does not allow this type of VM migration. So, what are my options with free ESXi license? I'm not willing to pay $500 for the license of the essential at this stage.

    Thank you!

    A few options, I can think of are:

    • export to the FVO and re - import
    • use VM explore Trilead and backup/restore virtual machines
    • Use the vmkfstools command to copy the virtual disks

    André

  • How to remove the virtual computer on a data store

    I'm moving VM (by the data store) to my new cluster data store and as I release a DS I have delete and create new with VMFS5.  I just emptied a data store but when I run the following command it shows again two VM on the same DS so when I navigate on the DS it is empty.

    Get-datastore-name "DS_NAME | Get - vm | FT name

    How to see where/how/why these two VMs are on the DS when it seems to be empty, and I'm assuming that PowerCLI is my best result. Of course, I don't want to just delete the DS as possible casue a problem with these virtual machines.  When I look at the settings them of each virtual machine they show that they are on a store of separate data and not that I'm trying to delete.

    Any help is appreciated

    Thank you

    Sean

    You can do:

    Notice-EEG-Id | Get-VIObjectByVIView

    or:

    Get - VM | Get-Datastore

  • How to divide the column Date OBIEE

    Hello
    We have the name of the date column: To_Date and the format is DD/MM/YY hh.
    How to divide the date in YEARS, MONTHS, DAY as new columns.
    kindly help on that.


    Kind regards.
    CHR

    Published by: 867932 on November 23, 2011 22:18

    Hi user,

    All 3 functions can be written in RPD too. MDB layer, duplicate the date column-> the mapping tab to column of Goto-> expression-> functions Builder Select-> calendar Date functions / hour-> select DayofMOnth function. The column of your logic formula will look like,

    DayofMonth (YourDateColumn)

    Rgds,
    DpKa

  • error in one of the scripts of mover of data during the installation of campus solution

    Hello world
    This is my first attempt to install one of the products of peoplesoft
    I install HCM 9.0 on windows 2008 64-bit, oracle 11g
    I am now in task called a 7-16-9: PeopleTools system data update
    I ran pt849tls.dms with success
    but pt850tls.dms failed with the error:

    File: Data error MoverSQL. Stmt #: 0 error Position: 25 back: 904 - ORA-00904: "PT_RETENTIONDAYS": invalid identifier
    Failure of SQL stmt:UPDATE PS_PRCSSYSTEM SET PT_RETENTIONDAYS = RETENTIONDAYS
    Error: Error execute SQL for UPDATE PS_PRCSSYSTEM SET PT_RETENTIONDAYS = RETENTIONDAYS

    Is there a script that I missed?
    I followed the instructions step by step
    Thanks for your help,

    Did you run the sql script generated by the generation of project successfully (it is not rel849un.sql and rel850un.sql either)?

    Nicolas.

    Published by: Gasparotto N on April 12, 2010 11:36

  • In the form of table and colspan or how to return more items in one line?

    I want to put a line in a higher number of items table it fits. So I want to put several options on an entry line field and text on another and so on. To restart the line, I made a dummy field with html like this:

    < table > < /tr > < tr > < td >

    But it's really ugly: http://apex.oracle.com/pls/apex/f?p=29764:1
    How to force colspan = X extend this cell of the input line along the table and get rid of these unnececary of the empty cells on the right? Attribute of the element does not (obviously)...

    Create a model of a named column custom report to meet the requirements in the form of tables.

Maybe you are looking for