Document Search returned only single doc. WLP7

Dear all,
I am facing a problem when I am using document management with WLP 7.0.
We created three documents as following:
doc1
doc1.md.properties
doc2
doc2.md.properties
doc3
doc3.md.properties
For each doc metadata we have
DROP_DOWN_LIST_NAME="dropdown1"
VALUE=SOMEVALUE(different for each doc)
When we were trying to use the following code for search, we are
expecting to retrive the above three documents, but in fact,
we got only the first one returned. What's wrong with our implementation?
DocumentManagerHome documentManagerHome = (DocumentManagerHome)jndiContext.lookup(
"java:comp/env/ejb/DocumentManager" );
DocumentManager documentManager = documentManagerHome.create();
String searchString = "DROP_DOWN_LIST_NAME == 'dropdown1'";
Expression searchExpression = ExpressionHelper.parse( searchString );
Search search = new Search( null, -1, "", searchExpression );
Enumeration searchResults = documentManager.getContent( search);
if( searchResults.hasMoreElements() ) {
Document document = (Document) searchResults.nextElement();
System.out.println("Search Result: " + document.getPropertyAsString(document.RESERVED_PROPERTY_SET,
"VALUE"));
Any help would be great appriciated.
Harry

Harry -
You might be encountering the content caching that occurs internally. If
you added doc1, ran loaddocs, ran the query, got back doc1, then added
docs2 and 3, ran loaddocs, ran the query, you would probably still get
back only doc1 for awhile, untill the cache timed out. Try turing off
metadata cache on the default DocumentManager via the WLP console
extensions (see e-docs). Or, you can try doing a
search.setContextParam("p13n.noCache", "true") in your code to turn it
off for that one search.
Otherwise, check the database tables (DOCUMENT and DOCUMENT_METADATA) to
make sure that the data is getting loaded correctly.
Greg
Harry wrote:> Dear all,
>
I am facing a problem when I am using document management with WLP 7.0.
We created three documents as following:
doc1
doc1.md.properties
doc2
doc2.md.properties
doc3
doc3.md.properties
For each doc metadata we have
DROP_DOWN_LIST_NAME="dropdown1"
VALUE=SOMEVALUE(different for each doc)
When we were trying to use the following code for search, we are
expecting to retrive the above three documents, but in fact,
we got only the first one returned. What's wrong with our implementation?
DocumentManagerHome documentManagerHome = (DocumentManagerHome)jndiContext.lookup(
"java:comp/env/ejb/DocumentManager" );
DocumentManager documentManager = documentManagerHome.create();
String searchString = "DROP_DOWN_LIST_NAME == 'dropdown1'";
Expression searchExpression = ExpressionHelper.parse( searchString );
Search search = new Search( null, -1, "", searchExpression );
Enumeration searchResults = documentManager.getContent( search);
if( searchResults.hasMoreElements() ) {
Document document = (Document) searchResults.nextElement();
System.out.println("Search Result: " + document.getPropertyAsString(document.RESERVED_PROPERTY_SET,
"VALUE"));
Any help would be great appriciated.
Harry

Similar Messages

  • Windows 8.1 PC, using reader, when searching a folder containing approx 100 doc's. If i search for a word, no results are returned. only the doc names can be found but nothing from within the doc. This is a new problem and was not the case before.

    Windows 8.1 PC, using reader, when searching a folder containing approx 100 doc's. If i search for a word, no results are returned. only the doc names can be found but nothing from within the doc.
    This is a new problem and was not the case before.

    Works perfectly fine for me with the latest Reader version (11.0.09).
    You write that it worked "before"; before what?  An update?  Update from what version to what version?

  • ADS search returns only 1000 nodes...

    Executing a search against the root node of ADS returns only 1000 objects despite the fact that that we have done searchControls.setCountLimit(0). We are using a non-anonymous connection which, in fact, is using an non-administrator's DN and password to login. When we use a non-anonymous connection which uses an administrator's DN and password, we get 2000 entries returned--so we have confidence that some setting inside ADS is the problem.
    Anyone know exactly what we need to tweak within ADS to allow us to get back a truly unlimited number of "hits" when searching?
    Thanks,
    Richard

    Here is the code snippet that helped me in fetching more than 1000 users hope this helps all.
              InitialLdapContext aContext = null;
              PagedResultsControl pageResultControl = null;
              try {
                   pageResultControl = new PagedResultsControl(999);
              } catch (Exception e) {
                   // TODO Auto-generated catch block
              Control[] controls = { pageResultControl };
              //this intializing value need to be take from
              //a configuration property
              List list = new ArrayList(1000);
              try {
                   //env is the propeties to be given for
                   //connneting to the AD/ldap
                   aContext = new InitialLdapContext(env, null);
                   aContext.setRequestControls(controls);
              } catch (Exception e1) {
                   // TODO Auto-generated catch block
              String searchBase ="dc=domain,dc=com";
              String[] attributes = {"cn","sAMAccountName","mail"};
              String searchFilter = "(objectClass=user)"
              SearchControls control = new SearchControls();
              //setting the count limit to zero
              //makes the system to fetch without limit
              control.setCountLimit(0);
              //set the time limit to zero for no time out
              control.setTimeLimit(0);
              control.setDerefLinkFlag(true);
              control.setReturningAttributes(LDAPManager.getMappedAttributes());
              control.setSearchScope(SearchControls.SUBTREE_SCOPE);
              SearchResult searchResult = null;
              NamingEnumeration ne = null;
              NamingEnumeration atNe = null;
              try {
              int i = 0;
              //a do while loop is executed
              //the do while iterated since
              //since the page result controls are finished
              byte cookie[] = null;
              String attrName = "";
              String attrValue = "";
              Attribute attribute = null;
              boolean toBeByPassed = false;
              do {
                   ne = aContext.search(searchBase, searchFilter, control);
                   while (ne.hasMoreElements()) {
                   searchResult = (SearchResult) e.nextElement();               if (searchResult == null)
                   continue;
                        i++;
                   //here construct the ldap
                   //user object and then
                   //populate to the array list
                   Attributes resultAttributes = searchResult.getAttributes();
                   if (resultAttributes == null)
                        continue;
                   atNe = resultAttributes.getAll();
                   if (atNe == null)
                   continue;
                   while (atNe.hasMoreElements()) {
                   //do what ever you want in this loop
                   //to get the attributes
              }//closing brace of the while loop of the attribute
              // enumeration
              }//end of the while loop of naming enumeration
              cookie = ((PagedResultsResponseControl) aContext.getResponseControls()[0]).getCookie();
              if ((cookie != null)) {
              System.out.println("Paging again for -> " + searchFilter);
                   aContext.setRequestControls(new Control[] { new PagedResultsControl(999, cookie, Control.CRITICAL) });
    } while (cookie != null);//continue until the server stops sending cookies
         } catch (Exception e) {
              System.out.println("OOPs i encountered some error while processing ");
              } finally {
                   //release the context here infact close it here

  • LDAP Search returns only 1200 records

    Hi!
    I'm having trouble searching an LDAP registry containing about 20 000 records. If I configure a search that should return about 15000 records I only get 1200 with the following error message when iterating through the NamingEnumeration:
    Unexpected exception occured at record 1200: javax.naming.SizeLimitExceededExcep
    tion: [LDAP: error code 4 - Sizelimit Exceeded]; remaining name 'o=ericsson'
    Code:
    package erildap;
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company: Numenor Communication AB
    * @author Andreas Gl�ckner
    * @version 1.0
    public class EgdLdap {
    Hashtable props = null;
    DirContext context = null;
    String server = null;
    int port;
    int version;
    public EgdLdap(String ldapServer, int port, int LdapVersion) {
    this.server = ldapServer;
    this.port = port;
    this.version = LdapVersion;
    static public void main(String[] args){
    SearchResult result = null;
    Attribute a = null;
    EgdLdap ldapObj = new EgdLdap("ldap.server.se",389, 3);
    try{
    ldapObj.connect();
    }catch(NamingException ex){
    System.out.println(ex.toString());
    String filter="(&(uid=qandglo)(ou=esg))";
    String[] returnAttrib = {"uid", "ou", "givenName", "departmentNumber", "L", "mail"};
    int scope = SearchControls.SUBTREE_SCOPE;
    NamingEnumeration enum = ldapObj.search("o=ericsson,ou=esg", filter, returnAttrib , scope);
    int i = 1;
    try{
    if (enum != null){
    while (enum.hasMoreElements()){
    result = (SearchResult)enum.nextElement();
    NamingEnumeration attributes = result.getAttributes().getAll();
    while(attributes.hasMore()){
    a = (Attribute)attributes.next();
    System.out.println(i+". "+a.toString());
    i++;
    }catch(Exception e){
    System.out.println(e.toString());
    e.printStackTrace();
    public void connect() throws NamingException{
    try{
    props = new Hashtable();
    props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    props.put(Context.PROVIDER_URL, "ldap://" + this.server + ":" + this.port);
    props.put("java.naming.ldap.version",String.valueOf(this.version));
    context = new InitialDirContext(props);
    }catch (NamingException e){
    System.out.println("Failed to connect to: " + this.server);
    props=null;
    throw e;
    System.out.println("Succesfully connected to: " + this.server);
    public void traverse(){
    try{
    Attributes at = context.getAttributes("cn=q*,o=ericsson");
    NamingEnumeration enum = at.getAll();
    while(enum.hasMore()){
    System.out.println(((Object)enum.next()).toString());
    }catch(NamingException e){
    System.out.println(e.toString());
    public NamingEnumeration search(String name, String filter, String[] returnAttribs, int type){
    NamingEnumeration result = null;
    SearchControls ctrl = new SearchControls();
    ctrl.setSearchScope(type);
    ctrl.setReturningAttributes(returnAttribs);
    if(context != null){
    try{
    result = context.search(name, filter, ctrl);
    }catch(NamingException e){
    System.out.println(e.toString());
    return result;
    }

    Hi,
    Two possible reasons:
    1. The size of the search results returned would have been controlled by the directory services administrator (Cross- check with the dir. services administrative options.
    2. Have you set the size limit programatically... using SearchControls.setSizeLimit(...) you should be using
    SearchControls.setSizeLimit(0) which returns all the results.
    Hope this hleps,
    Sathya Sayee.S

  • Numbers spotlight search returns only excel files.

    When I search for a file using spotlight all I get are excel files or CSV files. I don't have a custom search set up but, I can't get spotlight to include numbers files in the results of any search. I had excel for mac loaded for a while but, I removed it last year. now I have Numbers '09.

    When I search for a file using spotlight all I get are excel files or CSV files.
    Using Spotlight on your Mac?

  • CONTAINS - Return only searched words

    Hi,
    I would like to know if it's possible to use CONTAINS and return only the rows when the result contains ONLY the searched terms.
    I can't find a way to use CONTAINS and "NOT LIKE" together to build a single SELECT statement that works.
    Ex.
    I would like the result to be ROW 1 and2 ONLY.
    SEARCH: "AA CC"
    COL1
    1. AA CC
    2. CC AA
    3. AA BB CC
    4. CC BB AA
    5. AA BB
    Any help is appreciated.

    SCOTT@orcl_11gR2> create table test_tab
      2    (id    number,
      3       col1  varchar2(60))
      4  /
    Table created.
    SCOTT@orcl_11gR2> insert all
      2  into test_tab values (1, 'AA CC')
      3  into test_tab values (2, 'CC AA')
      4  into test_tab values (3, 'AA BB CC')
      5  into test_tab values (4, 'CC BB AA')
      6  into test_tab values (5, 'AA BB')
      7  select * from dual
      8  /
    5 rows created.
    SCOTT@orcl_11gR2> create index test_idx
      2  on test_tab (col1)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> variable search varchar2(60)
    SCOTT@orcl_11gR2> exec :search := 'AA CC'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select * from test_tab
      2  where  contains (col1, replace (:search, ' ', ' AND ')) > 0
      3  and    length (col1) = length (:search)
      4  /
            ID COL1
             1 AA CC
             2 CC AA
    2 rows selected.

  • Search function only returns the first entryinstead of 2600

    Hi all,
    I am using JDNI to search in a iPlanet LDAP. This is the code:
    String filter = "(objectclass=TDC-Empleado)";
    NamingEnumeration resultados;
    SearchControls limitacionesBusqueda=new SearchControls();
    limitacionesBusqueda.setSearchScope(SearchControls.SUBTREE_SCOPE);
    results = ctx.search("o=TDC",filter,limitacionesBusqueda);
    I know with another tool that this filter works but the search function only returns the first entry!!!
    Somebody can help me ?
    TIA
    Manuel

    humm.
    Sets ctx.setCountLimit(long), or else checks the "size limit" of your iplanet server (size limit: number of entries returned to the client application).
    A.V.

  • Delegated User Search returns first 200 entries only...?

    Hi Folks,
    We are using Delegated user administration.  When I try to perform a search against the user base it doesn't matter what I type in for search criteria it always returns the first 200 entries starting with the letter "a".  It's almost as if it ignores the search criteria I entered.  For example I can enter "W*" in the search field, select user from the drop down and perform a search.  It returns only the first 200 entries starting with "a".
    We are EP6.0 on SP13 for NW04.
    Anyone have any ideas?
    I would greatly appreciate any help.
    Regards,
    -Jon

    hi,
    User Management Properties (sapum.properties)
    The property file sapum.properties contains properties controlling the configuration of SAP User Management Engine. The installer creates the settings in sapum.properties based on input made during the installation process. You can modify this file after installation.
    If you are using User Management Engine with SAP Enterprise Portal, you can edit the properties file in the user management configuration tool.
    The default value is 200 and to change it you have to edit it.
    Regards,
    Ganesh N

  • My prefered(default) search engine, but searches in FF4 return only Yahoo results. How do I fix this?

    I installed FF4 this morning, and while I expected addon problems, I did not expect this. All searches return Yahoo results, even though my default SE is google. The google icon still shows in my search bar...I'm confused.

    Thank you, thank you, thank you, the-edmeister, thank you! I am in your debt, sir!

  • Document Search - External Repositories

    Hi Folks,
    Has anyone of you worked on integrating the content of external repositories in Document Search within CIC ? Would really appreciate if you could share your experience doing the same.
    Here are the details of what I am trying to achieve:
    Background:  
    We are on CRM 2007 and Implementing Customer Interaction Center (CIC).
    ECC 6.0, Enterprise Portal (EP)  7.0.
    TREX 7.0. We use a single TREX System for both CRM and Enterprise Portal (EP).
    We do not have SAP Content Server, Enterprise Search and not in scope for the CIC Project.
    As part of CIC, One of the Key Tools we are trying to implement is the Document Search.  We have repositories on the CRM System and External to CRM.
    For the Document Stored on CRM we will be using KPro (Tcode SKPR07) and Indexing on TREX to be searched through CIC Document Search.  This is available Standard, out of the Box.
    For  External Repositories ( i.e. Portal KM Documents  , Documents on Intranet Windows System )  we donu2019t have a Standard  design in CRM  to Integrate them into the CIC Document Search  using TREX.
    Any insight for implement Integration of External Repositories into CIC Document Search would be really helpful.
    Regards,
    Sumit B

    Hi Guest,
    I am quite sure that if you use an external document repository you can only use the features provided by the external repository. If the external repository provides document versioning and the repository manager used to integrate the repository in the KM repository framework does implement the functionality then you may be able to use document versioning.Otherwise, not.
    Hope I could help!
    Best regards,
    Martin

  • Document Search TREX in BW

    We have installed TREX search engine in BW 3.5 system. We are able to search the documents in RSA1->Documents successfully. Is there a FM or API that we can use to search these documents and return the Master Data these documents are attahed to and use that master data in BEx query.
    Thanks
    Amit

    This helped me already a bit.
    We have not only a R3-system, but also a CRM-system from SAP. In CRM I suppose that it possible that you have a Lead document which might be followed Opportunity Document, which is again followed by a Quotation document which is transferred to R3 to become a Sales Order Document etc... .
    We have already a need to see the opportunity document in CRM which lead to an accounting document in R3. I am looking for general solution, which is not much more work, but would have all kinds of positive side effects, that we can reuse for other purposes.

  • SharePoint Foundation 2010 Search returns no results

    Hi,
    SharePoint foundation 2010 Search is not showing any results after configuring the step from the below link.
    http://wiki.sirkit.ca/2011/04/sharepoint-foundation-2010-search-returns-no-results/
    My Server Setup : 
    SharePoint Foundation 2010
    SQL Server 2008 r2
    We have created two web application and configured the search service as above mention link.
    And we have migrated a site from MOSS 2007 to SharePoint 2010 to one of  web application,we assigned search database to the newly migrated content database.
    Previously there was Form based Authentication was done on Moss 2007 site and on SP 2010 we are working on Windows authentication.
    Database showing crawl is working and showing success results as well in SQL table, Its only Not able to show the results on the page.
    Thanks in Advance
    Dinesh
    Regards, Dinesh Reddy.

    Don't look at the databases, it's a bad habit to get into and will lead to confusion.
    In search administration are you getting any sucsess messages in the crawl history and is the number of items in your index non-zero?
    If so that implies that the crawl process is working and it's the user security that's the issue.
    To confirm try searching for a file whilst logged in as the crawl account, that should return results.

  • Issue in creating a add link to a document content type on a doc lib name with , / special characters

    hi,
    i am having a  requirement to create/use "add link to a document" content type for a item in the document library.
    so i got  the code from below site :
    http://howtosharepoint.blogspot.in/2010/05/programmatically-add-link-to-document.html
    my issue is, if teh document  library names are single words - like MOM, model, procedures etc this  functionality is working fine and i am able to view the link to a document as an item. 
    but when the doc lib name contains special characters like , or  /  , this link to a  document  content type functionality is NOT working.
    can anyone pls point me whether this is the  actual  issue ? ie, if  the doc lib name contains special chars  like , or /  my
    add link to a document wont work? is there any restrictions/limitations for doc lib names in SharePoint ?
    for eg: my doc lib names are :
    1) Report and analysis, Data
    2) form / template
    3) map/ plot
    help is highly appreciated!

    hi,
     its talking abt the subsite names and  folders and NOT the document librraies.
     is there any link which gives the naming convention / restricted names for  document libs or  splists , from msdn / blogs.technet.
    thnx

  • IC Webclient: document search not showing documents for contacts

    Hi,
    I am working with SAP CRM 4.0, SP7.
    I have created an account(a001) with three contacts(c001, c002, c003). I have attached a document(d001) to account a001 and two documents(d002, d003) to contact c001.
    Now when I open the IC-Web client UI and go to 'Identify Account' and enter a001 in the Account ID and do a search account, I see three contacts(c001, c002, c003) in the result list of account. When I click in the contact(c001) and go to 'Document Search', it shows only documents attached to a001 and there is no way I can see the documents attached to c001.
    Can anyone please let me know, how do I see the documents attached to contact c001 in this case?
    Please note that if I enter c001 in the Account ID of 'Identify Account' and then go to 'Document Search', then it shows me the documents d002 and d003. But, I want to see the contacts documents entering from accounts.
    Thanks in advance,
    Kunal

    Hello Hari,
    Sorry for the delayed Response, will check this BADI and if it helps then I will update this thread
    Thanks
    Chandu

  • In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    The application auto-saves your input when you close the document.  If you left the document, as you state, the notes/comments should have been saved and should have been visible the next time you opened the document with the Mobile Reader (note that if you are opening the document with another app such as Apple's built in PDF Viewer, things like notes/comments may not be visible).  Also note that if you are doing an Open In... from another app (like Dropbox), the version of the document in Dropbox does not update; only the version of the document in the Mobile Reader is updated.
    Would it be possible to send a video of the problem you are encountering to [email protected] so that we can try to help?

Maybe you are looking for

  • SSIS 2012 package scheduling with SQL Server 2008 R2

    Hi, We have a ssis 2012 package with parameters & would like to schedule this package in SQL Server 2008 R2 agent. Is there a way to pass parameters to the ssis package from SQL Server 2008 R2 agent? Thanks in advance.......... Ione

  • I can't get Photoshop CS3 to start up?

    Just installled SL and CS3 won't start up? Just hangs on loading screen? New MBP. Any idea's Thanks

  • External Image Editor bug?

    Trial version 10.1.3 I think... Preferences, touch up, chagne external editor to Paint.NET. Try to edit image. Paint.net says it cant load the image. So I wrote a quick program to see what parameters were being passed. Insetad of passing a pathname t

  • Need a line feed after 120 characters in a text file

    Hi , I am in the verge of developing a report program which generates a text file (space delimited) for a third party vendor - After 80 characters (name field) - I need to have space till 120th position in the record and then the cursor should naviga

  • Strange file in trash and it won't empty

    I have a strange file in trash and it will not empty. There is an alias file that has a strange name and a date of dec. 31, 1903. It will not go away when I empty. I put other files in the trash to see if they would be deleted and they do, but the ot