Problem in String Search using OKAPI in 9i Lite

We are creating an Symbian EPOC application using Oracle 9iLite in stand-alone mode. We have managed to create a C++ program that creates an Oracle database on the Nokia Communicator 9210.
The problem is that a string search returns either null or all of the searched records, ie. it does not work.
The code below should do the string search and return the strings that match the given keyword. Any idea why this is not working? We are using OKAPI.
TempCond[0].Operator = OK_GT;
TempCond[0].AttrPos = KEYWORDREFERENCE_INDEX_FOR_KEYWORD;
TempCond[0].AttrVal.BufPtr = (unsigned char*) szGivenKeyword;
TempCond[0].AttrVal.BufSize = OK_NEW_ARRAY | strlen szGivenKeyword);
TempCond[0].AttrVal.Indicator=1;
TempCond[0].Collate=0;
TempCond[0].Connective=OK_AND;
// Iterate through the entire group, extracting the key data
//(whatever the key may be) and the object reference, and
// append to the end of the array.
e = okCreateIterator( iEnv,
iEbmgKeywordReferenceGroupRef,
iEbmgKeywordReferenceClassRef,
FALSE,
1,
TempCond,
20,
0,
NULL,
&iter
Thanks for any help you may provide.

I am sorry, this is not an answer to your question but a little help from you is well appeciated.
I have just started exploring oracle 9i Lite to develop apps. on Palm and WinCE using OKAPI but the documentation does not seem enough. Is there some book or sample programs available that demonstrate OKAPI to develop form based apps ? CodeWarrior and Satellite Forms are not good when someone wants to try writing demp app.
Thanks,
Ashish

Similar Messages

  • Problem in WebUI Search using categories

    When doing an Advanced Find in the WebUI using a content type search specifing a Category and searching on the attributes, the results are the category instances and not the publicobjects that they associate with. The WinUI does this correctly. Ideas on how to correct?
    Michael D. Smith
    ERDC - CRREL
    603-646-4765
    [email protected]

    I am sorry, this is not an answer to your question but a little help from you is well appeciated.
    I have just started exploring oracle 9i Lite to develop apps. on Palm and WinCE using OKAPI but the documentation does not seem enough. Is there some book or sample programs available that demonstrate OKAPI to develop form based apps ? CodeWarrior and Satellite Forms are not good when someone wants to try writing demp app.
    Thanks,
    Ashish

  • Problems with string comparison using

    I have a problem using the > and < comparison operators.
    When the xsl:if test uses numeric values the comparison works OK. If the
    test uses string values it always returns a false result.
    The style sheet below shows an example (which should run against any
    XML doc with a root element)
    Note - the spurious
    tags are just for debugging- I write the
    output to an HTML page and IE happens to recognise them
    even though the rest of the HTML tags are missing !!
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:for-each select="*">
    Starting numeric test :
    <xsl:if test="(1 < 2)">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished numeric test :
    Starting alpha test :
    <xsl:if test="('a' < 'b')">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished alpha test :
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    null

    Having looked at the XPath spec I believe what I am trying to do (compare strings with gt and lt type tests) is not supported. The spec indicates that they can only be used for node sets or numerics. Presumably the processor is attempting to convert the values to numbers but evaluating them both as NaN (not a number). Can someone confirm this.
    I find this restriction quite strange, is this a situation where an extension function is required ? If so can someone point me to some (Java) examples.
    null

  • Problem in String cpmparison using #{} and ${}

    Hi,
    I am facing a strange problem. I want to compare values of the following 2 variables:
    {color:#0000ff}Variable 1 :{color} It is a variable for a dataTable.
    I take data from the dataBase in postDataModel. Variable named "post" is used to iterate over the various selected values of the result set.
    E.g. <h:dataTable value="#{ForumBean.postDataModel}" {color:#ff0000}var="post"{color} ......
    So, #{post.username} the value of 1 column. It is of type "String".
    {color:#0000ff}Variable 2 :{color} It is a variable from Backing Bean. say,{color:#ff0000} UserBean.name{color}
    Now,
    <c:if test="${UserBean.username == post.username}">
    then do something... </c:if>
    But the problem here is the above String comparison never returns true i.e. the Strings never match EVEN THOUGH both have the same value.
    That's because: {color:#ff0000}${post.username}{color} gives null String, while {color:#ff0000}#{post.username}{color} gives the actual username.
    E.g.
    ${UserBean.name} gives David
    #{post.username} gives David
    {color:#800000}How do I compare the 2 variables in JSTL? (JSTL only takes expressions with a '$' and not a '#') ?{color}
    Depending on these values I have to render or not render a column in dataTable.
    {color:#ff0000}{color}

    Yes I treid both ways. I even used the rendered attribute. When it failed, I switched to JSTL.
    Okay, for the same above question as posted above, according to you if I used the following:
    {color:#ff0000}rendered = " #{UserBean.name == post.username} "{color} should be evaluated to {color:#ff0000}true{color} and the column should be visible.
    But that is not happening.
    Is the above syntax for rendered and in-between String comprison correct?
    If not, it would be great if you could give me a work around as that is exactly what I want to do.
    Thanks.

  • Search given string array and replace with another string array using Regex

    Hi All,
    I want to search the given string array and replace with another string array using regex in java
    for example,
    String news = "If you wish to search for any of these characters, they must be preceded by the character to be interpreted"
    String fromValue[] = {"you", "search", "for", "any"}
    String toValue[] = {"me", "dont search", "never", "trip"}
    so the string "you" needs to be converted to "me" i.e you --> me. Similarly
    you --> me
    search --> don't search
    for --> never
    any --> trip
    I want a SINGLE Regular Expression with search and replaces and returns a SINGLE String after replacing all.
    I don't like to iterate one by one and applying regex for each from and to value. Instead i want to iterate the array and form a SINGLE Regulare expression and use to replace the contents of the Entire String.
    One Single regular expression which matches the pattern and solve the issue.
    the output should be as:
    If me wish to don't search never trip etc...,
    Please help me to resolve this.
    Thanks In Advance,
    Kathir

    As stated, no, it can't be done. But that doesn't mean you have to make a separate pass over the input for each word you want to replace. You can employ a regex that matches any word, then use the lower-level Matcher methods to replace the word or not depending on what was matched. Here's an example: import java.util.*;
    import java.util.regex.*;
    public class Test
      static final List<String> oldWords =
          Arrays.asList("you", "search", "for", "any");
      static final List<String> newWords =
          Arrays.asList("me", "dont search", "never", "trip");
      public static void main(String[] args) throws Exception
        String str = "If you wish to search for any of these characters, "
            + "they must be preceded by the character to be interpreted";
        System.out.println(doReplace(str));
      public static String doReplace(String str)
        Pattern p = Pattern.compile("\\b\\w+\\b");
        Matcher m = p.matcher(str);
        StringBuffer sb = new StringBuffer();
        while (m.find())
          int pos = oldWords.indexOf(m.group());
          if (pos > -1)
            m.appendReplacement(sb, "");
            sb.append(newWords.get(pos));
        m.appendTail(sb);
        return sb.toString();
    } This is just a demonstration of the technique; a real-world solution would require a more complicated regex, and I would probably use a Map instead of the two Lists (or arrays).

  • Problem with Join Queries using PHP and an Orcale Database

    Ok, I am trying to build a simple php querying tool for my oracle database and for the most part it is working however I am having a problem getting data from my join queries. If I run the following query :
    QUERY:
    SELECT lastfirst,EnteredBy,Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    Lastfirst     EnteredBy     Debit
    caiu, test      204     1
    But when I run the query correctly I get no results
    QUERY:
    SELECT sts.lastfirst,gl.EnteredBy,gl.Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    sts.lastfirst     gl.EnteredBy     gl.Debit
    and if I run the query combining the two above methods and adding a field (schoolid) that has the same name on both table I get the following result sets
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,sts.schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    lastfirst     EnteredBy     Debit     sts.schoolid
    caiu, test      204     1     
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    NONE
    Therefore, I have to have something written incorrectly in my php code and I just can not figure it out. My entire code is pasted below please provide me with an assistance you might have to offer. I have change the odbc_connec line so I could post it to this forum. In addition, I had to phrase out the column headers there for when you write the column headers you have to use ~ instead of , as the separator and then I turn back into the correct format for sql.
    //These scripts just open help windows if somone clicks on the icon
    <script>
    function submit()
    {document.sqlform.submit();}
    </script>
    <script>
    function colwin(){
    window.open("colnames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function tabwin(){
    window.open("tablenames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function help(){
    window.open("http://www.w3schools.com/sql/default.asp",null,"height=500,width=700,scrollbars=1");}
    </script>
    <form method="post" action="<?php echo $PHP_SELF;?>" name="sqlform">
    <?php
    //Cookie to check for authorization to the site
    if($_COOKIE['cookie']=="CheckCookieForAuth")
    //These get the values of the textareas after the form has been submitted
    $sqlSELECT = $_POST["SELECT"];
    $sqlFROM = $_POST["FROM"];
    $sqlJOIN = $_POST["JOIN"];
    $sqlWHERE = $_POST["WHERE"];
    $sqlOTHER = $_POST["OTHER"];
    $sqlSELECTTYPE = $_POST["SELECTTYPE"];
    //This is the variable used to parse out my headers the user entered
    $sqlColNames = split('~',$sqlSELECT);
    //This converts the ~ separator to , so I can actually use it as part of my sql string
    $search = array('~');
    $replace = array(',');
    $mystring = $sqlSELECT;
    $sqlString = str_replace($search, $replace, $mystring);
    //These are the textareas and the drop down options that the end users has to create queries
    echo "<table border=0>";
    echo "<tr><td valign='top'>";
    echo "<B>SELECT TYPE</B> <BR><SELECT NAME=SELECTTYPE>
    <OPTION VALUE='SELECT' SELECTED>SELECT</OPTION>
    <OPTION VALUE='SELECT DISTINCT'>SELECT DISTINCT</OPTION>
    <OPTION VALUE='INSERT'>INSERT</OPTION>
    <OPTION VALUE='UPDATE'>UPDATE</OPTION>
    <OPTION VALUE='DELETE'>DELETE</OPTION>
    </SELECT>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=SELECT wrap=physical>$sqlSELECT</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlC.jpg' width='25' height='25' onclick='colwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>FROM</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=FROM wrap=physical>$sqlFROM</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlT.jpg' width='25' height='25' border=0 onclick='tabwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>JOIN</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=JOIN wrap=physical>$sqlJOIN</textarea>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>WHERE</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=WHERE wrap=physical>$sqlWHERE</textarea>";
    echo "</td></tr>";
    //This is where the end user would enter group by, having, order by, etc..
    echo "<tr><td valign='top'>";
    echo "<b>OTHER</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=OTHER wrap=physical>$sqlOTHER</textarea>";
    echo "</td></tr>";
    This is a run query icon and a help icon
    echo "<tr><td colspan=2 align=right>";
    echo "<img src='images/RunQuery.jpg' width='30' height='28' onclick='submit()'> <img src='images/qm.jpg' border=0 width='25' height='25' onclick='help()'>";
    echo "</td></tr></table>";
    echo "<br>";
    echo "<br>";
    //This is where I connect to my remote oracle database
         $conn=odbc_connect('ODBC_ConnectionName','USERNAME','PASSWORD');
    //This is the sql string created by the end users
         $sql="$sqlSELECTTYPE $sqlString FROM $sqlFROM $sqlJOIN $sqlWHERE $sqlOTHER";
    //This executes the connection string and the sql string
         $rs=odbc_exec($conn,$sql);
    //This will display the query or a message if the query is empty
         if($rs!=NULL){
         echo "<table border=1>";
         echo "<tr>";
    //This loops through the string array the end user enter the field name text area to get column headers
         for($i=0; $i<count($sqlColNames); $i++)
         echo "<td>";
         print_r($sqlColNames[$i]);
         echo "</td>";
         echo "</tr><tr>";
    //This actually fetchs the rows from the statement and then display the data based on the column names the end user speificed
         while (odbc_fetch_row($rs))
              for($i=0; $i<count($sqlColNames); $i++)
                   $results=odbc_result($rs,$sqlColNames[$i]);
                   echo "<td>$results</td>";
              echo "</tr>";
         odbc_close($conn);
         echo "</table>";}else{echo "Results will be displayed here";}
    echo "<br><br>";
    echo $sql;
    else
    echo "Not logged in";
    ?>
    </form>

    This looks more like a SQL question than a PHP issue. There are a couple of JOIN examples at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2066611 that might you work through the problem.

  • Need sample code to do text search using boolean operators AND OR + -

    I'm looking for an algorithm doing text searches in files
    I need it to support AND OR + - keywords (for example "ejb AND peristence")
    Does anyone knows where I cand find this kind of algorithm with the full source ?
    Of course I can adapt C,C++ to Java.
    In fact my target language is Serverside javascript (sorry) so I prefere rather low level solutions !
    Any help will be grealy appreciated and the resulting code will be posted
    here and on my website : http://www.tips4dev.com

    Firstly, a little note to the technical solution: what you probably need the most is speed. I may sound strange, but personally I am convinced that if you could use system tools a naive algorithm:for i:=1 to m do
    grep (word)
    od; whose complexity is O(m.n), where m is the number of words to be processed and n somehow represents the cardinality of the text to-be-sought-through, so this naive algorithm would actually be in 99% of cases much faster than any implementation of the algorithm below, whose complexity is O(m+n), because the implementation of the grep routine (O(n)) would be optimized and m will be low (who queries 153 words at once?)
    Anyway, you asked for an algorithm and you'll have it. It is quite elegant.
    Aho, A.V. - Corasick, M.V.: Efficient String Matching - An Aid to Bibliographic Search, Communication of the ACM, 1975 (vol. 18), No. 6, pg. 333-340
    [i]The task: let's have an alphabet X and a string x = d1d2...dn (d's are characters from X) and a set K = {y1, ... ym} of words, where yj = tj,1 ... tj,l(j) (t's are again characters from X).
    Now we search for all <i, yp> where yp is the suffix of d1...di (occurences of the word yp in x)
    (note: if you want to search for the whole words tj,1 and tj,l(j) must be blanks)
    The idea of the algorithm is that we first somehow process words yp to construct a search machine and with this machine we will loop through X to search for occurrences of all the words at once.
    Example:
    K = {he, she, his, hers}
    X = ushers
    search machine M(Q - set of states, g - "step forward" function, f - "step back" function, out - reporting function):
    (function g)
    0 (initial state)  h-> state 1 e-> state 2 r-> state 7 s-> state 8 ... for {he, hers}
    state 1 i-> state 6 s-> state 7 ... for {his}
    state 0 s-> state 3 h-> state 4 e-> state 5 e ... for {she, he}
    And for all the characters is defined 0  x -> 0
    Now, in
    (function out)
    state 2: report {he}
    state 5: report {she, he}
    state 7: report {his}
    state 9: report {hers}
    "Step back" function f for this particular set of word would be:
    9 -> 3, 7 -> 3, 5 -> 2, 4 -> 1 otherwise the machine would return to the initial state 0
    Processing of ushers will look like:
    <0,0> u-stay in the state 0 <1,0> s-move to state 3 <2,3>, <3,4>, <4,5> state 5-report (he, she}, cannot move forward -> must step back (like if "he" was received) <4,2> r-move to state 8, <5,8>, <6,9>
    Before we show how to construct the searching machine M (Q,g,f,out) let�s consider the algorithm how to use it:
    Alg 1.begin
    state:= 0;
    for i = 1 to n do
    //if cannot move forward, move back
    while g(state, di) not defined do state:=f(state) od;
    //move forward to a new state
    state:=g(state, di);
    //report all the words represented by the new state
    for all y from out(state) do Report(i,y) od;
    od
    end.
    Alg 2. � build of the �step forward� function g and an auxiliary function o that will be later used for the construction of outvar q:integer;
    procedure Enter(T1�Tm);
    begin
    s:=0; j:=1;
    //processing a prefix of a new word that is a prefix of an already processed word too
    while j&ltm and g(s,Tj) defined do
    s:=g(s,Tj); j:=j+1;
    od;
    while j&ltm do
    q:=q+1; //a new state � global variable
    define g(s,Tj) = q; //definition of a single step forward
    s:=q;
    j:=j+1;
    od;
    //the last state must be a state when at least the processed word is reported
    define o(s) = [T1, � Tm];
    end;
    begin
    q:=0; //initial state
    for p:= 1 to k do Enter(yp) od;
    for all d from the alphabet X do
    if g(0,d) not defined then define g(0,d) = 0 fi
    od
    end. Alg 3. � build of the �step back� function f and the reporting function outcreate an empty queue
    define f(0) = 0; out(0) = {} //an empty set � we expect words of the length 1 at least
    for all d from X do
    //process children of the initial state
    s:=g(0,d);
    if s!=0 then
    define f(s) = 0; //1-character states, if we throw away the first character we return to the initial
    define out(s):=o(s); //report 1-character words, if any
    move s at the end of the queue
    fi
    od
    while queue not empty do
    r:= the first member of the queue; remove r from the queue;
    for all d from X do //process all the children of r
    if g(r,d) defined then
    s:= g(r,d); //get a child of r
    t:= f(r); //f(r) has already been defined
    while g(t,d) not defined do t:=f(t) od;
    //we found a state from which g(t,d) has sense
    define f(s) = g(t,d);
    define out(s) = o(s) UNION with out(f(s));
    move s at the end of the queue;
    fi
    od
    od
    Processing of a query � normal forms
    Until now we have solved the problem how to search for multiple words in a text at once. The algorithm returns not only not only whether a word was found or not, but also where exactly a word can be found � all the occurrences and their locations.
    However, the initial task was slightly different: procession of a query like �X contains (y1 AND/OR y2 � yn)� In order to decide a question like that it might not be necessary to find all the occurrences of given words, actually not even an occurrence of all the words (e.g. word1 OR word2 is fulfilled as soon as either word1, or word2 is found).
    Let�s suppose that a searching query is given in its disjunctive normal form (DNF):
    A1 OR A2 OR ...Ak where each of Ax = B1 AND B2 AND ...Bkx and Byz is a statement �X contains yp�
    Now, the query is successful whenever any of Ax is fulfilled.
    (I don�t know how much you know about transformation of a logical formula to its disjunctive form � it is quite a famous algorithm and can be found in any textbook of logic or NP-completeness. I hope that evaluation of the formula, which is what happens in the procedure Report of the algorithm Alg. 1, is trivial.)

  • Problem in retrieving search result

    Hi Experts,
    I wrote Java Application for Search Using Index Management APIs.
    I am not getting any result.
    Just look at my code
    <b>i have taken some Variable String x="" to test my code</b>
    IIndexService indexService =
          (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService("IndexmanagementService");
          <b> x=x+ "1"+ indexService.getID();</b>
           IFederatedSearch federatedSearch =
      (IFederatedSearch)indexService.getObjectInstance("federatedSearchInstance");
    //  get list of all active indexes
    //alternatively use the indexService to get indexes by index ID and add them to a list
          List listuser=indexService.getActiveIndexes();
          <b>x=x+ "  2  " + listuser.size();</b>
    //  build IQueryEntryList
          SearchQueryListBuilder sqb = new SearchQueryListBuilder();
      sqb.setSearchTerm(query);
      IQueryEntryList qel = sqb.buildSearchQueryList(); 
      <b> x=x+ "  3  " + qel.size();</b>     
    //search
      ISearchSession  session = federatedSearch.searchWithSession(qel, listuser,resourseContext);
          <b> x= x + "  4  " + session.getTotalNumberResultKeys();</b>   
          //get the Results
      ISearchResultList results = session.getSearchResults(1,session.getTotalNumberResultKeys());
       ISearchResultListIterator iter = results.listIterator();
          <b> x= x " 5  " results.size();</b> 
               while (iter.hasNext())
             ISearchResult result = iter.next();
         IResource resource = result.getResource();
           IURLGeneratorService url =
          (IURLGeneratorService)ResourceFactory.getInstance     ().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
            uri=uri + url.getResourcePageUri(PathKey.CONTENT_ACCESS_PATH,resource.getAccessRID(),null).toString();
              <b> x=x+"  6  ";</b>     
              <b> x=x+ "  7  "+uri.length();</b>}
    return x;
    The output what i am getting is....
    For this line <b> session.getTotalNumberResultKeys(); </b> i am getting output as 1 (one).
    Means there is one result.
    I am retrieving the results and storing it in 'results' list object
    like this
    ISearchResultList results = session.getSearchResults(1,session.getTotalNumberResultKeys());
    When i say results.size() i am getting 0 as output.
    What is this strange behaviour....?
    Total results are 1(one)
    When i try to retrieve them it says 0(zero) results.
    When i perform normal search in protal there also i am getting only one result(when i search * as a search query).
    the same i am doing it here.But  i am not able to retrieve the result.
    To test this application , i am converting this java Class into Webservice and deploying it in searver.
    The reason why i am converting it into webservice is , it will be used other portal i.e Sharepoint Portal.(They will call this webservice in their code)
    Why is it happening so.
    Any one has ideas , where it is going wrong.
    Regards
    Bala

    HI Udit,
    Yes i got the answer to it.
    In my case the prblem was with the user credentilas.
    When i run the same application from WebDynpro, it was working fine, meanse result list and result keys was same.
    But when i run it as java application, i had the problem which you had.
    So what i did is, I have checked which user it is taking in WebDynpro and which user it is taking in my java Application. Surprisingly it was different.
    So tried with the same user, which it is taking in WebDynpro.
    generally by default it takes <b>Guest</b>  user in WebDynpro.
    So first try this application from webdynpro, if it works fine there.
    Take the same user name and pass it from your java application.
    It is the problem with user name only.
    any way i am sending you my code , have look at it.
    public class SearchJavaClass {
         String uri = "";
         //LinkedList list1 = new LinkedList();
         //public String Go(String query) {
         public List Go(String query) {
              String var =null;
              List SearchURL= new ArrayList();
              int i=0;
              //x=x+"i am in Go";
    //          com.sap.security.api.IUser nwUser =
    //               UMFactory.getAuthenticator().getLoggedInUser();
              com.sap.security.api.IUser nwUser = null;
              try {
                   //com.sap.security.api.IUser nwUser1 = UMFactory.getUserFactory().getUser("Guest");
                   //x = x + "nwUser1: "+nwUser1.getName();
                   nwUser = UMFactory.getUserFactory().getUserByLogonID("Guest");
              } catch (UMException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              try {
                   // Bala start
                   com.sapportals.portal.security.usermanagement.IUser ep5User =
                        WPUMFactory.getUserFactory().getEP5User(nwUser);
                   ResourceContext resourseContext = new ResourceContext(ep5User);
                   IIndexService indexService =
                        (IIndexService) ResourceFactory
                             .getInstance()
                             .getServiceFactory()
                             .getService(
                             "IndexmanagementService");
                   IFederatedSearch federatedSearch =
                        (IFederatedSearch) indexService.getObjectInstance(
                             "federatedSearchInstance");
                   List listuser = indexService.getActiveIndexes();
                   SearchQueryListBuilder sqb = new SearchQueryListBuilder();
                   sqb.setSearchTerm(query);
                   IQueryEntryList qel = sqb.buildSearchQueryList();
                   ISearchSession session =
                        federatedSearch.searchWithSession(
                             qel,
                             listuser,
                             resourseContext);
                   ISearchResultList results =
                        session.getSearchResults(1, session.getTotalNumberResultKeys());
                   ISearchResultListIterator iter = results.listIterator();
                   //String uri = "";
                   //ArrayList al= new ArrayList();
                   //al.add(uri);
                        //var="";     
                   while (iter.hasNext()) {
                        var ="";
                   //     SearchVO searchvo = new SearchVO();
                        ISearchResult result = iter.next();
                        IResource resource = result.getResource();
                        IURLGeneratorService url =
                             (IURLGeneratorService) ResourceFactory
                                  .getInstance()
                                  .getServiceFactory()
                                  .getService(IServiceTypesConst.URLGENERATOR_SERVICE);
                        uri =
                             url
                                  .getResourcePageUri(
                                       PathKey.CONTENT_ACCESS_PATH,
                                        resource.getAccessRID(),
                                       null)
                                   .toString();
                        com.sapportals.wcm.util.uri.IUriReference uri9=url.getResourcePageUri(PathKey.DETAILS_PAGE, resource.getAccessRID(),null);
                        //@@@@@@@@@com.sapportals.wcm.util.uri.IUriReference uri99 =uri9.appendPath(uri);                    
                        IHierarchicalUri uri7  = url.createAbsoluteUri(uri9);
                           var = uri7.toString();
                           //searchvo.setIHierarchicalUri(uri7);
    //                       SearchURL.add(i,uri7);
                        SearchURL.add(i,var);
                        var="";
                           i++;
    //                     var = var"   "uri7;
              // Bala end     
              } catch (ResourceException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (UserManagementException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (WcmException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } finally {
    //               if(SearchURL.isEmpty())
    //               return SearchURL ;//+ " No matches have been found";
    //               else
    //               //return var;
                   return SearchURL;
         public static void main(String[] args) {
              SearchJavaClass obj = new SearchJavaClass();
              obj.Go(" Search Term");
    Regards
    Bala

  • After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.

    After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.Urgent.TQ

    Izit software or hardware? Confuse:(
    Only can use wifi now.
    Any way thanks guys for ur suggestion:) amishcake and simes

  • Enterprise Search using Sharepoint Server 2007 + SAP R/3

    Hi experts,
    I want to achieve an enterprise search using SharePoint Server 2007 (MOSS).
    SharePoint includes the BDC (business data catalog) which allows you to communicate with the SAP System.
    I read in the Microsoft whitepapers that thereu2019s a need for a web application server 6.40.
    So here is the problem:
    We have SAP R/3 Enterprise 4.7 with WAS 6.20. We donu2019t want to change or upgrade the SAP system.
    There are ways to connect the WAS to the R/3 system e.g. RFC.
    But does this still work for search in SharePoint?
    Did anybody already deal with this problem?
    Any other ideas connecting SharePoint to SAP in this scenario?
    Best regards
    Philipp Detemple

    > and having requirement to upgrade OS version from B.11 to B.23. Currently server is hosting SAP R/3 Enterprise version.
    So you upgrade HP-UX 11.11 to HP-UX 11.23?
    > I have tried to serach SAP service market place for PAM, but could not find specific information on version upgrade from B.11 to B.23
    Yes - because there is no HP-UX 23.x, only 11.23 and 11.31. For the version overview check
    Note 939891 - HP-UX: End of Support Dates
    Note 1075118 - SAP on HP-UX: FAQ
    > My Questioin is: If we copy system as it is to new host and if we keep the same Kernel Patch 196, will it work fine or give issue?
    It will work.
    > So even if I got for latest patch 304 which is released on 16.11.2009, still the OS version for which it built is B.11, so if we have B.23, will it work? I would not see the possibilities of kernel upgrade at this stage.
    Why no possibility for a kernel upgrade if you install a new server?
    > so with same kernel will it work? What else I need to check for the migration and make sure that everything works fine on new server.
    Check
    Note 831006 - Oracle 9i installation on HP-UX 11.23 and 11.31
    Markus

  • How do you perform partial word search using PDF Open Parameters?

    Hello,
    We are using the 'search=' open parameter in the URL string, which open a PDF and automatically searches for a word within the PDF.  It works great for whole word searches. Unfortunately, it does not work for partial word, or phrases. In other words, if I'm searching on '123456' and there is a word in the document that is '1234567', it will not find the partial word, or first 6 characters of the 7 character word. You can perform a partial or phrased search using the advance search feature of Adobe Reader.  So, currently after the PDF opens, and shows no hits on the automatic search for '123456', we are able to manually search again for a partial word search, and then see matches in the document.  Is there any way to specify to use a whole or partial word search when using the 'search=' open parameter, so that we can automatically match on partial and whole words?  Something like 'search=123456*'?

    It never worked that way. Command-F shows the page search bar.

  • Failed to convert Clob to String by using dbms_lob.substr

    it says that the cache is not enough to do this.
    I would like to get some infos from two tables as a View.
    and one of the table contains a Clob data which is large
    than 4k i think.
    and when I tried to create the view, it says that expecting
    - but got Clob, so I would like to change it to String by using
    dbmas_lob.substr function and met the cache limited problem.
    The database I am using is 10.2.0.1.0.

    Thanks for reply.
    and the problem was fixed.
    after I removed 'distinct', which specified after 'select'.

  • Problem in JDBC , when using LIKE operator. - VERY URGENT

    Problem in JDBC , when using LIKE operator.
    LINE 1 : String temp = "AA";
    LINE 2 : String query = "select * from emp where EMPNAME like '*temp*' ";
    LINE 3 : Staement st = con.createStaement();
    LINE 4 : ResultSet rs = st.executeQuery(query);
    '*' character is not getting evaluated. In MS ACCESS2000 only * is accepted instead of '%'. Moreover in MS ACCESS the like operator has to be used within double quotes as a String. whereas in other databases, it accepts single quotes as a String.
    Ex:
    In MS ACCESS
         select * from emp where ename like "*aa*";
    Other Databases
         select * from emp where ename like '%aa%';
    In my situation iam passing a Variable inside a like operator and '*' is used.
    For the above Scenario, Please help me out.
    If possible Kindly let me know the exact Syntax.
    Please give me the answer as LINE1,LINE2,LINE3,LINE4,
    I have verified in JDBC Spec also, it has been specified to use escape sequence.that too did not work.
    Due to this, My project is in hold for about 4 days. I could not find a suitable solution.
    Please help me out.

    I made a LIKE clause work with M$ Access, using PreparedStatement and the % wildcard:
                escapeStr                   = "%";
                String sql                  = "SELECT USERNAME, PASSWORD FROM USERS WHERE USERNAME LIKE ?";
                PreparedStatement statement = connection.prepareStatement(sql);
                statement.setString(1, ("user" + escapeStr));
                ResultSet resultSet         = statement.executeQuery();
                while (resultSet.next())
                    System.out.println("username: " + resultSet.getObject("USERNAME") + " password: " + resultSet.getObject("PASSWORD"));

  • Little problem with Strings.

              I have an little problem with Strings, i make one comparision like this.
              String nombre="Javier";
              if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
              Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
              this before and are equals.
              What I do wrong?.
              

    You are actually making your users key in things like
    "\026"? Not very user-friendly, I would say. But
    assuming that is the best way for you to get your
    input, or if it's just you doing the input, the way to
    change that 4-character string into the single
    character that Java represents by '\026', you would
    use a bit of code like this:char encoded =
    (char)Integer.parseInt(substring(inputString, 1),
    16);
    DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
    System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :)

  • Problem with users search

    Hello,
    I'm trying use the tasks functionality in portal however when I try to get the user to assign te task the search don't returns anything.
    I've used the standard demo also and it doesn't work, has somebody got this problem?
    thanks
    Wagner Moreira

    Hi Wagner,
    Typically you can do a wildcard search (using *) for first/last name and user ID, based on the attribute values defined for the user search. Please note that the return key on your keyboard does not start the search, but serves as a separator between multiple entries (you have to click "Select" to start the user search).
    You can change the configuration of the user search function delivered by SAP – the assignment of attributes to system users and the definition of the attributes relevant for the search – to suit the requirements of your company.
    For more details, take a look at http://help.sap.com/saphelp_nw04s/helpdata/en/b1/6a55422f4d3830e10000000a155106/frameset.htm
    Hope this helps
    Christian Stadler
    SAP NetWeaver Product Management

Maybe you are looking for

  • HOw to create a text file in the given path and delete it after the use?

    Hi all, I am trying to create a text file at the given path and delete the created file after the use. I am using following code.: import java.io.*; // write binary data as characters public class RanIO {                                         publi

  • Hyperion planning data form in smartview: problem with summary time period

    We are using Planning ver. 11.1.2.2.300.20 and smartview 11.1.2.2.300 (build 070) We use common Data Form: In columns: Periods (Descendants including YearTotal - with no checkbox on start expanded) In Rows :accounts In some of our users computers, Wh

  • Uploading/Downloading table to/from *.csv - file

    Hi all. First I need to upload this internal table (actually it is a copy of database table) to a file *.csv, and then to be able to download the table back from it. All this should be done using field symbols and methods GUI_UPLOAD, GUI_DOWNLOAD fro

  • CONNECTING TO WINDOWS PC SP2

    im trying to connect my playbook to my pc running xp sp2 but it wont install properly because it says i need sp3 but I don't have Internet connection so can't update my pc how can I connect my playbook without blackberry device manager installing or

  • E65 and CA-44 adaptor

    Hey guys, First post and am hoping someone can advise!!! I can't charge my E65 using the CA-44 adaptor, I've tried using 3 different adaptors all to no avail(all adaptors work on other Nokia phones). Normal charging works fine. I'm hoping to use TomT