Problem with the Oracle text markup

Hello

I have a problem with the Oracle text markup.

I am looking for keywords in a text which is composed by a question and answer.
Here is the structure of my text:
& lt; div class = 'question' & gt;
& lt; a & gt; the title of my question & lt; /a & gt;
& lt; div class = "reply & gt;
content of response
& lt; / div & gt;
& lt; / div & gt;

It is possible to search those keywords in the question or answer only. For this, I use the stored procedure:

{call CTX_DOC. MARKUP)
index_name = >?
textkey = >?
text_Query = >?
restab = >?
query_id = >?
startTag = >?
(EndTag = >?)}

_with these parameters: _

index_name = < my index >
textkey = < id for the search text >
text_Query = < a query containing the keywords >
restab = < a table SQL to store the marked text >
query_id = < id >
startTag = ' < span class =-"highlight\" >. "
EndTag = "</span >.

The markup should be done only in the place you want (question, answer, or both).
The markup is good when I search a keyword throughout the text, in the question or answer only.
* If I search two key words in the question or answer, the markup is bad *.

_Example: __
I am looking for the words "* Internet *" in question only.
Here's the query passed to the stored procedure:
+ * text_query * = 'service & internet' INPATH (//div[@class = 'question'] / has) +.

In the question, these words are well marked.
In response, only the first word is marked.

* Why the first keyword is also marked in the response while the query specifies a search in question only? *

The same problem appears when I search for the same keywords in the response only.
In this case, in the answer, these words are marked as well.
In the issue, only the first word is marked.

Thanks for your help

Edited by: user11088931 Apr 21. 2009 06:17

Try text_query = (service & internet) INPATH (//div/a)

Single quotes in a query do nothing. I think that your request has been treated as

Service & (internet INPATH (//div/a))

Tags: Database

Similar Questions

  • Performance issues and options to reduce the loading with the Oracle text implementation

    Hi Experts,

    My database on Oracle 11.2.0.2 on Linux. We have Oracle implemented for the fuzzy search. Our oracle text indexes are defined as sync on commit that we cannot afford to have stale data.  Now our application done literally thousands of inserts/modifications/deletions of these columns where we have these Oracle text index defined. Thus, we see a significant impact on performance because the oracle text synchronization routines is called on each commit. We do nightly index optimization (optimization full every night at 3:00).  The text index oracle internal operations are appearing at the top of the sql page in our AWR report and fears it causes a lot of load on the DB.  Since we do optimization of the complete index once during the night, I think I should change that, and if I do, he's going to help us?

    For example, here are some data of AWR report my one day:

    Time elapsed (s) Executions Time by Exec (s) % Total % CPU %IO SQL ID SQL module SQL text
    27,386.25305 4410.0916.5015.829.98ddr8uck5s5kp3Start ctxsys.drvdml.com_sync_i...
    14,618.81213 9800.078.818.3927.7902yb6k216ntqfbegin ctxsys.syncrn (: idxownid,...)


    More top sql full text:

    ddr8uck5s5kp3begin ctxsys.drvdml.com_sync_index (: idxname,: idxmem,: partname);
    end
    02yb6k216ntqf

    begin ctxsys.syncrn (: idxownid,: idxoname,: idxid,: ixpid,: rtabnm,: flg); end;

    Now if I do optimization of the complete index that more often, and not only once night 15:00 will be this average, the load on DB sync on commit will decrease? If Yes, how many times should I optimized and the optimization itself does not lead to a load? Can anyone suggest?

    Thank you

    OrauserN

    It's to you which values you want to experiment.  Since 1 G, which is the same as 1024M is the maximum I could try that assigning to an index and see what effect it has.  You can use the same AWR report that you used previously and compare performance.  To determine when paging depends on your operating system and what tools you have.  Another option might be to use TRANSACTIONAL, that allows searching for unsynchronized lines and allow you to synchronize every five minutes, like Herald suggested, without any latency problem.  You can read about it here (scroll down to transaction):

    http://docs.Oracle.com/CD/E11882_01/text.112/e24436/csql.htm#CCREF23731

  • Problem with the bulleted text

    I am new to InDesign and the suite CS4 and am having a problem with the flow of text in a bulleted list in a trifold brochure.

    I work with a background image to EPS and in the bulleted text in a text box in one of the 'pages' text will be not as typed - jumps to the next line for some reason any. If I create a text box similar off the page I have no problem, and it lists as needed.

    The first image is as it should be, and the next image is how it makes its appearance. Any attempt to change seems futile.

    Any ideas please?

    ImgA.jpg

    ImgB.jpg

    Could there be a small invisible frame with applied at that time dress up there?

    Select all to see if it presents itself, or access the properties of frame and select this option to ignore the text wrapping to see if skin everywhere make these round lines.

    k

    I wonder if this background image a dressing applied with a setting, detect the edges so that the part of the image is kicking back your text.

  • Please help with the oracle text and select for each word in the sentence

    Hello

    I have a problem with a query which NEEDS to be done in SQL (not pl/sql in the stored procedure):

    Suppose that a phrase such as "Church of snowboarding."

    Can I divide this by using:
    Select regexp_substr ('church snowboard', ' [^] +', 1, level) word
    of the double
    connect regexp_substr ('church snowboard', ' [^] +', 1, level) is not NULL)

    now I have words 'showboard' and 'Church '.

    So far so good.

    Now I need for each of these words, to create a list of unique IDS collected using text oracle contains the query as follows: (pseudocode)
    for SPLIT.word in "snowboarding", "Church".
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, SPLIT.word, 1) > 0
    UNION
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, ' SYN('||)) SPLIT.word: ', GR_THESAURUS)', 1) > 0
    UNION
    SELECT 100 AS NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE NAME LIKE '% "| SPLIT.word | '%'

    so of course I have to untangle this UNION to remove duplicates

    Anyone here sees a way out of my situation? A way to make the loop in a select (use with and such) then
    Just add a select distinct NO_MATRC, NO_NOM_ from)

    I tried, but I'm out of ideas so I thought that some guru here might have the answer ;)

    Thanks in advance for any advice

    See you soon

    You might end up with something like the XML below, ideally as binding in the query.

    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, e
    Church of snowboard

    transform ((JETONS, "{", "}", "AND"))
    transform ((JETONS, "{", "}", "OR"))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'AND'))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'GOLD'))
    transform ((JETONS, «?)) {","} "," AND"))/seq >
    transform ((JETONS, «?)) {","} "," GOLD"))/seq >



    (1) > 0

  • Problem with the new text box - large size

    Hello

    I have a problem with InDesing and just can't understand why it's happening.

    When creating the text box (frame), I am selecting the text tool and want to drag a new text box, InDesing creates a new frame with size 1221, 058 x 1221, 058 mm (always, no matter what...). When I'm typing in it, the text is invisible, in the same way that it is out of reach of the size of the image (at the bottom right I see the Red Cross). It happenes even after hitting only one character and I can't make it visible (adjust to the right).

    Someone has any suggestions how to solve this problem?

    I will be grateful.

    System: Win 8.1

    InDesign worm. : output 2015.4 CC / 11.4.1.102 x 64 build

    Best regards

    Andrzej

    huge_textbox_InDesign.jpg

    First try: 101 troubleshooting: replace, or 'trash' your InDesign preferences

  • Problems with the HTML text and cutting!

    Hey everybody,

    This is my first post a lot! I have a very simple question but frustrating, I cut text in illustrator (object > slice > make), then to make this text in HTML (slice Options) text. Then I export my picture with other pictures behind this text using the 'Save for Web and devices' option to find that the "HTML" text has moved all art behind it!

    I have attached a picture of a very basic example of what is going on, as you can see all around this text has been moved, the text does not stay on top of the work behind it?

    screenshot.jpg

    I would appreciate any help on this problem, probably very easy to solve!

    Thank you very much!

    There is nothing "to"stay on top"- a slice is a slice and they are prepared automatically side by side. You can only assign a background color. I strongly suggest do you a little reading on HTML / CSS first. No offense, but you are using the wrong tool if you think that I could remotely anything like usable HTML code...

    Mylenium

  • Problem with the imported text from quark

    Hello world

    I imported the files of version 4 of quark offshore from a mac to Indesign cs4 on a windows PC. all is well apart from the text being a bit messed up, so I'm pretty happy with that. The problem is that when I drag or copy and paste into a new document images will move but new text will not work with the images.

    By this, I mean that when I try to type something above or nearby graphics graphics just disappear! You can drag on the image that they disappear, then when you drag them away them again reappear!

    Forms I hover over have a thin white border on them where the forms I created directly do not have this boarder.

    Any help you cold give me on this would be great!

    Thanks in advance!

    Sam

    A screenshot would be useful. Post the files would be even better.

    But a guess would be that the objects are actually online and text blocks have skin that are applied to them.

    Bob

  • IDCS5 JS: problem with the "captured" text lose formatting

    Hi all

    Excellent script from Peter Kahrel allows us to convert the notes in endnotes dynamic in IDCS5 after which, we use some of our own JS to enter this text, put it in an orange box and then delete the original text of notes. This works very well but have just realized that the formatting (italics) who was in the original notes text does not survive moved to the new text box. Italics is still protected by a character style.

    Our code;

    //searches for endnotes, puts them in a orange box and adds the "Endnotes" heading
    app.findGrepPreferences = null;
    app.changeGrepPreferences = null;
    app.findChangeGrepOptions.includeFootnotes = true;
    
    var myDoc = app.activeDocument
    var myPara = myDoc.paragraphStyles.item ("Endnotes");
    
    // Find the text & capture its contents to a variable
    app.findGrepPreferences.appliedParagraphStyle = "Endnotes"
    origText1 = app.activeDocument.findGrep (); 
    
    //check if any Endnotes are found, nothing happens if not
    if(origText1.length!=0)
    {
    newText1=origText1[0].contents;
    
    //adds new text frame on 1st page of doc
    var myTextFrame1 = myDoc.pages.item(0).textFrames.add();
    myTextFrame1.geometricBounds = ["6p", "6p", "36p", "36p"];
    
    // Apply the objectStyle to frame
    var myOStyle = myDoc.objectStyles.item("Endnote box");
    myTextFrame1.applyObjectStyle(myOStyle); 
    
    //add captured text to text box
    myTextFrame1.contents = ("Endnotes\r" + newText1);
    
    var myDelete = myDoc.paragraphStyles.add ({name: "Endnotes1", basedOn: myPara});
    
    // Loop to apply paragraph style to text
    var length = myTextFrame1.paragraphs.length
    
    for (var i =0; i<=length-1; i++ )
    {
    //apply para style to new frame contents
    var myStory = myTextFrame1.paragraphs[0].parentStory
    myStory.paragraphs[i].appliedParagraphStyle = "Endnotes1"
    }
    
    //removes original text
    app.findGrepPreferences.appliedParagraphStyle = "Endnotes"
    app.changeGrepPreferences.changeTo="";
    app.documents.item(0).changeGrep();
    
     // remove Endnotes1 paragraph style and replace with Endnotes style
    myDelete.remove (myPara)
    }
        
    else
    {
     }
    

    As you can see enter us the text to a variable using GREP and that place in a new box (preceded by a heading). Make us a copy of the para style 'notes', which allows you to style the copied text, remove any style with the original style (the original formulation) and then delete the new style replacing wiith the original style so that the copied text back to style 'notes' new para. I don't know there's a better way, but it works for what we want - at least I thought that this was the case.

    Any thoughts appreciated gratefully. I searched the forum but couldn't find anything relevant. What Miss me?

    Thank you

    Iain

    Why don't you just "move" the texts found for the box of endNote?

    I suggest the following approach (not tested, project code):

    function moveEndnotesInBox()
    //--------------------------------------
    // Searches for endnotes, puts them in a orange box and adds the "Endnotes" heading
    {
        // Preset findGrep
        // ---
        app.findGrepPreferences = null;
        app.findChangeGrepOptions.includeFootnotes = true;
        app.findGrepPreferences.appliedParagraphStyle = "Endnotes";
    
        // Find the text(s)
        // ---
        var doc = app.activeDocument,
            foundTexts = doc.findGrep(),
            i = foundTexts.length;
    
        // If no 'Endnotes' text is found, return
        // ---
        if( !i ){ alert("No endnote found"); return; }
    
        // Creates a new text frame on 1st page w/ specific
        // bounds, and preset contents
        // ---
        var tf = doc.pages[0].textFrames.add(
            {
            geometricBounds: ['6p', '6p', '36p', '36p'],
            contents: "Endnotes\r"
            });
    
        // Preset obj and parag. style
        // ---
        tf.appliedObjectStyle = doc.objectStyles.itemByName("Endnote box");
        tf.parentStory.paragraphs.everyItem().appliedParagraphStyle = "Endnotes";
    
        // Backup the last insertion point index
        // ---
        var    ips = tf.parentStory.insertionPoints,
            ipx = ips.length - 1;
    
        // Loop through foundTexts and move texts to tf
        // (IMPORTANT: from the last to the first item to preserve Text indices)
        // ---
        while( i-- )
            {
            foundTexts[i].move(LocationOptions.AFTER, ips[ipx]);
            }
    }
    
    moveEndnotesInBox();
    

    Of course you must still deal with the possible lack of returns of paragraph or 'ghost' reference markers. I do not exactly know the context, but it seems not complicated.

    Hope that helps.

    @+

    Marc

  • I have a problem with the Arabic text

    Hello

    I hope you can help?

    I do a letter that I have an Arabic translation of in a word document. When I copy and paste into Illustrator it changes the police (he says times new roman in the word doc, but the version of illustrator out times new Roman but seems completely different) and the right to the left direction from left to right. How can I fix it? I use CS4 which I think is the ME version (it is said in the Middle East on the side of the box) I know that the previous designer here managed to do this with the software, so I was hoping someone would have the answer?

    I do a letter that I have an Arabic translation of in a word document. When I copy and paste into Illustrator it changes the police (he says times new roman in the word doc, but the version of illustrator out times new Roman but seems completely different) and the right to the left direction from left to right. How can I fix it?

    Make sure that your language of the document is correctly set to Arabic in Word. Just typing Arabic and the document actuall in Arabic is two different things. Incompatibilities affect the Unicode beaches, resulting in errors of characters are copied to the Clipboard. In artificial intelligence, check alternatives on the range of text and glyphs palette as well as your glyph protection global pref.

    Mylenium

  • Problem with the tool of markup for text editing in Adobe Pro XI on a Mac automatically remove the first character

    When I use the markup of text editing tool, I pointed out a word/phrase/sentence and then start typing in the replacement, the first letter is automatically highlighted and then removed when the second letter is typed. Thus, each word/phrase/sentence I type is missing in his first letter. Very annoying and has just started happening recently.

    Someone else encountered this?

    No idea how to solve this problem?

    I use a Mac.

    Hi LPerkins,

    The issue that you are facing is known for us and a Bug was registered for the same.

    The engineering team works to its difficulty. This only happens on Mac and on Windows.

    Kind regards

    Rave

  • Problem with the 3D text

    Make the text a 3d object pushed back is fairly easy, but if I add filters for text, select it, and then try to make an object pushed the SELECTION, the text is rendered in 3d, but

    There is no hole between the letters O and P and. Is there anyway that I can cut in these letters? If not, if not, how can I make the text 3d with filters on them?

    Any help would be greatly appreciated, thanks

    See if this helps:

    http://forums.Adobe.com/message/4238532#4238532

  • Problems with the photoshop text tool

    I have photoshop CS6 and when I try to type using the text tool from the line that indicates where you write (the one that flashes) remains always at the beginning of the sentence that I write, so when I try to type in a comma or a point he puts it at the beginning of the line and not at the end. I don't know why it does. Thank you

    Have you tried Easter medium to check and change the setting there?

    In addition, on the type Panel, you have an option in its shortcut menu reset type. (icon at top right)

    You can also right click on the type tool icon in the options bar to reset.

  • Problem with the display of alt text

    Hi guys, I have a strange problem here. my www.gogua.gr site cannot display alt text and I can not find the error, can you help me?

    Your website doesn't have a problem with the replacement text apart from the fact that you use innapropriately.  What I think you are looking for is 'ToolTip' that IE displays when you hover an image with alt text?  If so, that is to say wrongly uses the alt text and Firefox is correctly I think that, with the title attribute.  It isn't your site that may or may not display the text, this is the browser.

    With regard to the use of alt text to say 'click to enlarge', this isn't such a good idea.  The use of the text is to provide an alternative text for the image in case a viewer is not the images displayed, or uses a screen reader.  It should be used to describe the image.

    Martin

  • SSRS for lack of outer join with the Oracle data source

    It seems to be a problem with the Oracle driver used in the Reporting SERVICES query designer.

    When you use an Oracle data source, if I create an outer join in the graphic designer, it automatically inserts '{OJ' before the join and '} ' after her.  This is an incorrect syntax for Oracle and refuses to start.  The curly braces and the JO editable in designer text, but if I go back to the graphic designer and immediately to reintegrate them.

    Only, this has started to happen a year or two ago - before that it worked, but with the old (+) syntax.

    Can it not be healed?  It makes things very difficult.

    -Geoff

    Hi Geoff,

    Thanks for posting in the Microsoft Community.

    However, the question you posted would be better suited in the Forums of the Oracle Support; We recommend that you post your query in Oracle Support Forums to get help:

    https://forums.Oracle.com/forums/main.jspa;JSESSIONID=8d92100c30d8fb401bcbd10b46c38c9ddf1a3242549a.e34SbxmSbNyKai0Lc3mPbhmSc3aNe0? CategoryID = 84

    If you have any other questions or you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • Problems with the indexing of the files on my hard drive

    Hello world

    I am a newbie to oracle and I try to index files from my hard drive with the oracle text. After that I created a simple text file (path: "c:\tmp\test.txt") and filled with a short text, I executed the following lines without error message:

    Grant connect, resources, myuser ctxapp;
    create table myuser.testtab (id number primary, key BFILE text);
    create or replace directory test_dir as "c:\tmp";
    grant read on the myuser test_dir directory;
    insert into myuser.testtab (id, text) values (1, BFILENAME ('test_dir', 'test.txt'));
    create index myuser.idx_test on myuser.testtab (text) indextype is ctxsys.context;

    the record in the table testtab is stored, but the index table is empty. After that I tried to get information on the bfile with java, I got a SQLException with the error ORA-22285 Code after you run the following lines:

    File of type BFILE = null;
    try {}
    RSet = stmt.executeQuery ("select text from testtab where id = 1");
    If (rset.next ()) {}
    file = (rset) .getBFILE (1) (OracleResultSet);
    System.out.println ("result from fileExists:" + file.fileExists ()); This is the line where the exception is thrown
    }
    } catch (Exception e) {}
    e.printStackTrace ();
    }

    I would be obliged for more information on this problem.

    Thanks in advance,
    Chris J.

    PS: I use Oracle 11.2 g on Windows 7

    I got your problem. Drop any directory, table and index. Log in as "myuser" and do all the things. See the demo below. Do not use the name of myuser.object during execution of the orders of 'myuser '.

    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> create table hr.testtab(id number primary key, text BFILE);
    
    Table created.
    
    SQL> create or replace directory test_dir as 'c:\';
    
    Directory created.
    
    SQL> grant read on directory test_dir to hr;
    
    Grant succeeded.
    
    SQL> insert into hr.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
    
    1 row created.
    SQL> ed
    Wrote file afiedt.buf
    
      1* create index hr.idx_test on hr.testtab(text) indextype is ctxsys.cont
    SQL> /
    
    Index created.
    
    SQL> select * from ctxsys.CTX_INDEX_ERRORS;
    
    ERR_INDEX_OWNER                ERR_INDEX_NAME                 ERR_TIMES
    ------------------------------ ------------------------------ ---------
    ERR_TEXTKEY
    ------------------
    ERR_TEXT
    --------------------------------------------------------------------------
    HR                             IDX_TEST                       31-AUG-10
    AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> select * from CTX_USER_INDEX_ERRORS;
    
    ERR_INDEX_NAME                 ERR_TIMES ERR_TEXTKEY
    ------------------------------ --------- ------------------
    ERR_TEXT
    --------------------------------------------------------------------------
    IDX_TEST                       31-AUG-10 AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    
    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> drop directory test_dir;
    
    Directory dropped.
    
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> create or replace directory test_dir as 'c:\';
    
    Directory created.
    
    SQL> drop table testtab;
    
    Table dropped.
    SQL> create table testtab(id number primary key, text BFILE);
    
    Table created.
    SQL> set serverout on
    SQL> DECLARE
      2   v_file BFILE := BFILENAME ('TEST_DIR', 'test.txt');
      3   BEGIN
      4   IF DBMS_LOB.FILEEXISTS (v_file) = 1 THEN
      5  DBMS_OUTPUT.PUT_LINE ('File exists.');
      6   ELSIF DBMS_LOB.FILEEXISTS (v_file) = 0 THEN
      7  DBMS_OUTPUT.PUT_LINE ('File does not exist');
      8  ELSE
      9   DBMS_OUTPUT.PUT_LINE ('Unable to test existence');
     10   END IF;
     11   END;
     12  /
    File exists.
    SQL> insert into testtab values (1,BFILENAME ('TEST_DIR', 'test.txt'));
    
    1 row created.
    SQL> create index idx_test on testtab(text) indextype is ctxsys.context;
    
    Index created.
    
    SQL> select * from CTX_USER_INDEX_ERRORS;
    
    no rows selected
    

Maybe you are looking for