Sql search through a document

Hi. all. I have a problem. I have a table with records and in each record there is a column that contains a link to a file. I have an html input text form and i would like to search through the file of each record if it contains the word that i entered in the html form. is there a way to do it with pl/sql and sql.
Thank you in advance,
Antonis.

Here is an overview from the docs what Oracle Text can do:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/content.htm#sthref2643

Similar Messages

  • Where is the search option to search through a document on adobe reader x?

    where is the search option to through a document on reader x?

    It's usually Ctrl+F (on Windows).

  • Using Oracle Text to search through WORD, EXCEL and PDF documents

    Hello again,
    What I would like to know is if I have a WORD or PDF document stored in a table. Is it possible to use Oracle Text to search through the actual WORD or PDF document?
    Thanks
    Doug

    Yes you can do context sensitive searches on both PDF and Word docs. With the PDF you need to make sure they are text and not images. Some scanners will create PDFs that are nothing more than images of document.
    Below is code sample that I made some time back to demonstrate the searching capabilities of Oracle Text. Note that the example makes use of the inso_filter that is no longer shipped with Oracle begging with Patch set 10.1.0.4. See metalink note 298017.1 for the changes. See the following link for more information on developing with Oracle Text.
    http://download-west.oracle.com/docs/cd/B14117_01/text.101/b10729/toc.htm
    begin example.
    -- The following needs to be executed
    -- as sys.
    DROP DIRECTORY docs_dir;
    CREATE OR REPLACE DIRECTORY docs_dir
    AS 'C:\sql\oracle_text\documents';
    GRANT READ ON DIRECTORY docs_dir TO text;
    -- End sys ran SQL
    DROP TABLE db_docs CASCADE CONSTRAINTS PURGE;
    CREATE TABLE db_docs (
    id NUMBER,
    format VARCHAR2(10),
    location VARCHAR2(50),
    document BLOB,
    CONSTRAINT i_db_docs_p PRIMARY KEY(id)
    -- Several notes need to be made about this anonymous block.
    -- First the 'DOCS_DIR' parameter is a directory object name.
    -- This directory object name must be in upper case.
    DECLARE
    f_lob BFILE;
    b_lob BLOB;
    document_name VARCHAR2(50);
    BEGIN
    document_name := 'externaltables.doc';
    INSERT INTO db_docs
    VALUES (1, 'binary', 'C:\sql\oracle_text\documents\externaltables.doc', empty_blob())
    RETURN document INTO b_lob;
    f_lob := BFILENAME('DOCS_DIR', document_name);
    DBMS_LOB.FILEOPEN(f_lob, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.LOADFROMFILE(b_lob, f_lob, DBMS_LOB.GETLENGTH(f_lob));
    DBMS_LOB.FILECLOSE(f_lob);
    COMMIT;
    END;
    -- build the index
    -- Note that this index differs than the file system stored file
    -- in that paramter datastore is ctxsys.defautl_datastore and not
    -- ctxsys.file_datastore. FILE_DATASTORE is for documents that
    -- exist on the file system. DEFAULT_DATASTORE is for documents
    -- that are stored in the column.
    create index db_docs_ctx on db_docs(document)
    indextype is ctxsys.context
    parameters (
    'datastore ctxsys.default_datastore
    filter ctxsys.inso_filter
    format column format');
    --search for something that is known to not be in the document.
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Jenkinson', 1) > 0;
    --search for something that is known to be in the document.  
    SELECT SCORE(1), id, location
    FROM db_docs
    WHERE CONTAINS(document, 'Albright', 1) > 0;

  • How can I search through a scanned document?

    I often have hundreds of pages to read through for my job and I get the files in paper format and in PDF scans.  Is there an adobe program that will allow me to search a scanned document for a key word or name?  It would save me so much time.

    Hi td1137,
    If the document is scanned pdf document, you may run OCR feature in Adobe Acrobat to make the text searchable. http://www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe-acrobat-xi-scan-pape r-to-pdf-and-apply-ocr-tutoria…
    Then save the document and you may use Acrobat or Reader to search keyword in same pdf document.
    How to create a searchable text document from a scanned page | Acrobat X Tips & Tricks | Adobe TV   check how to make scanned document searchable.
    Regards,
    Ajlan Huda.

  • Now that I have upgraded to Yosemite I have a problem when I scan documents.  Before, a window showed today's activity.  Now I have to search through all my documents and hope to find what I just scanned.

    Now that I have upgraded to Yosemite I have a problem when I scan documents.  Formerly, a window showed today's activity.  Now, I have to search through all the documents in my history to find what I just scanned.  Sometimes I can't even find the doc.

    Most scan apps have a setting whereas, your scan(s) can go directly to your desktop.  No need to "hunt" for scanned docs.

  • Searching for a document through TREX

    Hi
    we have installed portal and TREX and we have uploaded sample document under KM content> Documents(default folder in the KM) folder.and we have created the index and we have mentioned the data sources as KM Content> Documents.
    but we search for this document we are getting "No Matches found error".
    Any idea?
    Thanks
    Ravi

    Hi,
    Follow these threads:
    https://forums.sdn.sap.com/thread.jspa?threadID=33094
    https://forums.sdn.sap.com/thread.jspa?threadID=35683
    https://forums.sdn.sap.com/thread.jspa?threadID=88337
    Regards,
    Praveen Gudapati

  • How do I search a word document stored in a BLOB using PHP?

    I have been successful at saving files in a blob field using oracle.
    I need to search through the word document, how can I do it using PHP?
    Please help!

    You're going to want to look at the Text Application Developer's guide.
    9i - http://otn.oracle.com/pls/db92/db92.show_toc?partno=a96517&remark=drilldown&word=microsoft+word
    10g -
    http://otn.oracle.com/pls/db10g/db10g.show_toc?partno=b10729&remark=drilldown&word=text+application+developer%27s+guide
    Give this a read and it'll give you what you need in order to search CLOB and BLOB fields for text data.
    It all works around a particular type of index which is then referenced using a CONTAINS clause in your SQL... eg:
    SELECT id FROM documents WHERE CONTAINS( document_body, 'Oracle' ) > 0
    Once you've got your head around the basic priniciples you're going to want to look at the document filters. This should allow you to index MS Word documents (warning: I've never used this for Word).
    It's not something that you can just pick up from reading a 20 line reply on a forum, but it sounds like what you're looking for.
    We use it here in order to look up on HTML documents, and it works a treat. We converted our Word documents to HTML so we could mark them up and then display them inline on pages.
    We wrap up the SQL that actually does the CONTAINS clause in a PL-SQL function, but I don't image there's a problem issuing a CONTAINS over OCI. Let me know if it works!
    Might this be an option for you?
    Blog at http://robertbaillie.blogspot.com

  • How to make SharePoint 2013 search only in document content?

    We are using SharePoint 2013 environment and are facing following issue while doing search in the document library.
     There is  one document library named “MYDOC” .and it has two columns name ‘DocTitle’ and ‘DocTag’.. Although we are able to perform search on basis of document metadata and content, however we only want to search through the content of documents
    in the library and not on the basis of document metadata (like ‘DocTitle’ or ‘DocTag’ columns). Is there a way to restrict search to document content only and not metadata?
    Excluding the column name will not help since, if the searched keyword is exists in metadata as well then that item of library will not come in result. Is there any way of writing query in such a way that only document content will get queried?
    -Aditya

    Addition to the above,
    Show or hide content from lists or libraries in search results
    As a site owner, you can decide whether items in lists and libraries on your site are included in search results. By default every list and library is set to include all items in search results.
     Note    To change this setting, you must have the Manage Lists permission level. The Designer and “Site Name” Owner groups contain this permission level. When you do not have Manage Lists permissions, the menus
    described in this procedure are not available.
    Navigate to the site that contains the list or library that you want to change.
    Locate and click the list or library you want to customize.
    Click Site Actions, and then click Site Settings.
    Under Site Administration, click Site Libraries and lists.
    Click an item from the list, for example, Customize “Shared Documents.”
    On the List Settings page, under General Settings, click
    Advanced settings.
    In the Search section, under Allow items from this document library to appear in search results, select
    Yes to include all of the items in the list or library in search result or
    No to exclude all items from search results.
    http://office.microsoft.com/en-in/sharepoint-server-help/enable-content-to-be-searchable-HA010379092.aspx

  • Searching through archived docs from Filenet in SAP tcode OAAD

    We archive our payroll journals at runtime to Filenet - some can be up to 3500 pages. We can easily retrieve those docs using tcode OAAD in SAP.
    Once retrieved, however, we are having issues searching within the document. For example, if we search for 'Jones' (and there are 10 occurrences), we may hit only the first one. When we continue the search, we get a message that nothing was found.
    But, if we search for 'Smith' we find the first and may be able to continue finding the other 9. Also, I'm the only 'Phelan' in the list - when we search, I am able to find my info in the report.
    Has anyone run across anything similar?
    Thanks alot,
    robert.

    Hi Kiran,
    Did you try creating a logical port using "SOAMANAGER" or "LPCONFIG" using the WSDL, i guess this should take care of it by applying the necessary settings in LP.
    Not sure if you have gone through the below link, also the OSS note mentioned on the below link doesnt seem to exist, try searching for an OSS note on marketplace
    [http://help.sap.com/saphelp_nw04/helpdata/en/4e/af3a40243c174ee10000000a1550b0/frameset.htm]
    Regards,
    Chen

  • Searching through very large vectors

    I am working on a way to process two flat tab delimited files into a tree, assign a x and y coordinate to each node in the tree and output all the nodes (with their coordinates) to a new flat file.
    I currently have a program that works pretty well. It roughly uses the following flow.
    - Read both files into memory (by opening the file reading each line and load the appropriate data from each line into a Vector, making sure no duplicates are entered by comparing the currentline to the last line.
    - Using the first vector (which contains the strating nodes) search through the second vector (which contains parent child relationships between 2 nodes) to construct the tree. For this tree I use a XML DOM Document. In this logic I use a for loop to find all the children for the given node. I store the index of each found reference and when all children are found I loop through all the indexes and delete those records from the parent-child vector.
    - After the tree is created I walk through the tree and assign each node a x and y attribute.
    - When this is done I create a NodeList and use are for-loop to write each node (with x and y) to a StringBuffer which is then written to a file. In this process for each new node that is written I check (in the StringBuffer) if the node (name) is present. If not I write the new Node.
    - For debugging purposes I write all the references from the second Vector to a file and output the XML DOM tree to a XML file.
    This program works wel. It handles files with 10000 start nodes and 20000 parent-child references (30000 nodes in total) in under 2 minutes (using 1:20 for the generation of the output file).
    However when the volume of these file increase it starts to struggle.
    As the ultimate test I ran it with a file that contains 250000 start nodes and 500000 references. For it to run I need to use the -Xmx256m parameter to allocate extra memory. But I ran it for 2 hours and killed it because I didn't want to wait longer.
    What I would like to know is how I can approach this better. Right now I'm loading the data from the files into memory entirely. Maybe this isn't the best approach.
    Also I'm looping through a Vector with 500000 elements, how can this be done more efficiently? However the reference vector isn't sorted in any way.

    Hi,
    That's no problem.. Here's some sample code:
    package tests;
    import java.util.List;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.LinkedList;
    import java.util.Iterator;
    class Example {
        private List roots;
        private Map elements;
        public Example() {
            roots = new LinkedList();
            elements = new HashMap();
        public void initRoots(String[] rows) {
            for (int i=0; i<rows.length; i++) {
                String[] parts = rows.split(" ");
    String name = parts[0];
    roots.add(name);
    elements.put(name, new Node(name));
    public void addChilds(String[] rows) {
    for (int i=0; i<rows.length; i++) {
    String[] parts = rows[i].split(" ");
    String parentId = parts[1];
    String name = parts[2];
    addNode(parentId, name);
    private void addNode(String parentId, String name) {
    Node current = (Node)elements.get(name);
    if (current == null) {
    current = new Node(name);
    elements.put(name, current);
    Node parent = (Node)elements.get(parentId);
    if (parent == null) {
    //Parent is missing, is that a problem?. Create it now.
    parent = new Node(parentId);
    elements.put(parentId, parent);
    return;
    parent.addChild(current);
    public void printTree() {
    for (Iterator it = roots.iterator(); it.hasNext(); ) {
    String id = (String)it.next();
    printChildren(id, 1);
    private void printChildren(String id, int depth) {
    Node node = (Node)elements.get(id);
    System.out.println(node);
    private static final class Node {
    private String name;
    private List children;
    private Node(String name) {
    this.name = name;
    children = new LinkedList();
    public void addChild(Node node) {
    children.add(node);
    public String toString() {
    return name + " " + children;
    public static void main(String[] args) throws Exception {
    Example test = new Example();
    test.initRoots(new String[] {
    "SU_1 1 1 1 0 0 0 0",
    "SU_2 1 1 1 0 0 0 0",
    "SU_3 1 1 1 0 0 0 0"
    test.addChilds(new String[] {
    "COM_1 SU_1 PR_1 0 0 0 0 0",
    "COM_1 PR_1 ST_1 0 0 0 0 0",
    "COM_2 SU_2 PR_2 0 0 0 0 0",
    "COM_2 PR_2 ST_2 0 0 0 0 0",
    "COM_3 SU_3 PR_3 0 0 0 0 0",
    "COM_3 PR_3 ST_3 0 0 0 0 0"
    test.printTree();
    The execution prints:
    SU_1 [PR_1 [ST_1 []]]
    SU_2 [PR_2 [ST_2 []]]
    SU_3 [PR_3 [ST_3 []]]
    /Kaj

  • Search Through Invoice option in Transaction tab in BOB webshop

    Hello Experts,
    We have the following requirment.
    -Search through Invoice option in transaction tab in BOB webshop.
    We understand that this would be through devlopment in ABAP/ Java.
    Isthere any otehrway to achieve this ?
    Pointers to this would be helpful.
    Thanks in advance.
    Regards
    Sanjib

    Hi Sanjib,
    Do you really need an enhancement for this?
    1. Can you see the invoices created for your order as a part of the document flow in BoB webshop order?
    2. Also, hope you have done the setting in TRANSACTION tab in SHOPADMIN Setting for your BoB Webshop
    If yes, you should be able to search the Transaction with the INVOICE option.
    Hope this will be useful
    Regards

  • How do you search through posts?

    I'm having trouble with itunes u 'New URL box'...and I can't find how to search through posts! One post said to click on 'More Options' but I dont' see that either.

    A subscriber info dump is likely the fastest way.  If you're curious regarding other methods, you can also use the Data Link Explorer (CUDLE) tool which is in the Cisco Unity Tools Depot.  All extensions for all objects are referenced in the "DTMFAccessId" table.  The View menu has a Query Builder which you can use to compile a SQL query that searches for a digit string.  It's best to search for both the 10 digit string as well as an abbreviated string as Unity sees them essentially the same and they are usually should be associated with a single subscriber.  Once you find a match, you can use the "ParentObjectId" value associated with the DTMF access ID to look for a matching owner in the "GlobalSubscriber" table.  The ParentObjectId should match the SubscriberObjectId for a subscriber (assuming the DTMF access ID is assigned to a subscriber).  This is the same thing as looking at SQL; however, you are not directly accessing the DB so this is generally considered the safest way to browse and get a feel for where things are.
    Hailey

  • Obtaining an oracle.sql.STRUCT through a pooled JDBC connection

    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection defined in Weblogic. I need the vendor-specific object, rather than simply the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT. I can use reflection on this object to find and call the getVendorObj() method to obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is not a published API and is not guaranteed not to change in future versions.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct through a WebLogic connection pool in WebLogic Server 10?
    Thanks for any advice,
    -Dan Schwemlein

    dan schwemlein wrote:
    Joe,
    Thanks again. With your guidance, I have arrived at the following approach, which I'll post for the benefit of others, and which I'd be thankful if you would validate:
    1) Import the jar com.bea.core.datasource-1.0.0.0.jar from %BEA_HOME%\modules, which is the only location of the class WLConnection, which is the only class with the getVendorConnection() method you refer to.
    2) Get the logical connection from the pooled data source, cast it to a WLConnection, call getVendorConnection() to obtain an OracleConnection (from the ojdbc jar), and use this connection to obtain the required oracle.sql.STRUCT from an OracleResultSet.
    3) Be aware of the limitations and follow the guidelines in the document http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 regarding security, error handling, releasing resources (close only the logical connection), etc.
    Does this sound like the approach you had in mind?
    Thanks again,
    -Danyes.
    Joe
    >
    Re: Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
    Posted: Jul 16, 2007 3:21 PM
    dan schwemlein wrote:
    Thanks for the quick response!I was working today...
    Thank you for the information about the connection being closed.
    I will look into using this configuration setting.
    You say that you can describe a way to get a handle on an unwrapped
    pool object using some documented WLS-specific code. Are you referring
    here to the getVendorConnection() method?yes.
    This method does not help me
    get the oracle.sql.STRUCT object, because even the connection returned
    by getVendorConnection() returns a wrapped WL java.sql.Struct object
    from a call to getObject().I don't believe it. If you are running in WLS, with a local pool,
    the getVendorConnection() will give you the Oracle connection,
    which will give you an Oracle statement, etc, down to an oracle
    STRUCT object. Once you have a direct reference to the oracle connection,
    we're not in the picture when it returns something to you.
    It would be great if getVendorObj() were
    documented and could be counted on in future versions. To use this
    method, one would still have to access it via Java reflection, because
    the wrapper class and its getVendorObj() method would be exposed in an
    API, correct? Could this method be exposed in the API, so that reflection
    doesn't need to be used, or it is exposed somewhere that isn't documented?getVendorObj() is not yet exposed or therefore supported for the general
    wrapped object, so you would have to start from the connection and
    derive all subobjects from it.
    Thanks again,
    -Dan Schwemlein
    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a
    vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection
    defined in Weblogic. I need the vendor-specific object, rather than simply
    the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object
    which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT.
    I can use reflection on this object to find and call the getVendorObj() method to
    obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is
    not a published API and is not guaranteed not to change in future versions.Understood. We all benefit from sticking to the J2EE standards,
    but we could also wish Oracle had done so with it's driver objects.
    I will assume your code is running in the WebLogic server, because
    an external JVM can never access the real driver object, which will
    always really be in the WLS JVM. No active JDBC object is serializable.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct
    through a WebLogic connection pool in WebLogic Server 10?There is no way to get a handle on an unwrapped pool object without using some
    WLS-specific code, though I can describe a way with documented methods,
    and/or I can get our documentation altered to say we'll support the
    getVendorObj() method. We introspect every vendor object, and for those
    implementations that have done the wise thing, projecting any non-standard
    methods as an Interface, we are able to also project that Interface so
    the vndor example code should work. However, in some poorly-done
    cases, such as for some Oracle stuff, there is either no Interface,
    or the Oracle code has extensions that take java.sql objects as input,
    (at least that's the signature of the method) but two lines into the
    method, the Oracle code assumes and casts the java.sql object to a concrete
    Oracle object. In these use cases you need the direct unwrapped object.
    We provide and document Connection.getVendorConnection(), and intend
    getVendorObj() to serve the same for subobjects, but note the dangers
    and responsibilities: We rely on our wrappers to implement the security
    and thread-safety of our pooling system. Because user code can get
    unrestricted access to the actual connection from most JDBC objects,
    we can never trust that we have complete control once a vendor object
    is exposed. Therefore, by default we will close and replace every JDBC
    connection so exposed, as soon as the current thread is finished with
    the pool connection. This hurts performance. We also document a pool
    config setting that will tell us that you take responsibility for any such
    problems, and not to close connections just because they've been exposed.
    HTH,
    Joe
    Thanks for any advice,
    -Dan Schwemlein

  • Searching through multiple InDesign files

    I use InDesign via Windows.  In Windows I can search for key words through documents and folders via My Documents/Explorer.  Is there a way to search through multiple InDesign files the same way? 

    I don't think there is.
    If you use this indesign batch convert
    And convert your InDesign files to RTF - they should be searchable when using the search function in windows.
    Does that help?

  • Intermedia search through a database link.

    Has anyone been able to do a search through a database link on an intermedia index in another database?
    My sql is:
    select title
    from [email protected]
    where contains (title,'test')>0;
    I get the following errors:
    ORA-20000:
    ORA-02063:
    null

    I guess you cannot do this. I read somewhere (not on top of my head where) that this is not supported.
    null

Maybe you are looking for

  • How can I synchronize my Contacts in my iMac with those in the Cloud?

    I have tried to sinchronize the Contacts in my iMac,  but it doesn´t work.  I have linked my iMac to iCloud.  When I go to iCloud directly through Internet,  I can see the "Contacts" I haver in iCloud.  I have 6,624 contacts.  The list of contactas c

  • Is there a way to "monitor" for new music as in WMP?

    I am reluctantly using iTunes for the first time in many years and I'm not ready to have all new music (whether purchased or manually imported) live in my iTunes folder. Currently, the only files in that folder are my WMAs that were converted to mp3

  • Adding attachments to an email

    Does anyone know of any application or when Apple will allow attachments to be added to emails? I am starting to enjoy my iPhone but in order to use it for business I have to be able to attach documents to emails. Right now, as I know, we can only ad

  • Targeting Screen Sharing/VNC to Spaces?

    Hi All, Does anyone know if it's possible to target a "space" just for Screensharing/VNC? I've got a Mac Mini that is setup as a dedicated Media Server running Plex, but it still requires maintenance from time to time. Sadly, whenever I log in via VN

  • Multiple triggers for single popup

    Maybe it is dumb question to ask... sorry if that is so but... Is it possible to have several triggers in different parts of page for the same action? E.g. I want to open one lightbox by means of five different buttons. How to do that? Thanks.