SES Filter - Adding Multiple Filters with same custom attribute

Hi,
I have added custom search attributes and am able to add a filter to the doOracleSearch method.
filter[0] = new Filter(new Integer(100), "NUMBER", "equals", 10020);
Now I have to add another filter for same search attribute with or condition, how can I do that..
I tried following..
filter[0] = new Filter(new Integer(100), "NUMBER", "equals",10020);
filter[1] = new Filter(new Integer(100), "NUMBER", "equals", 10049);
But how do I specify it is or and the above code is not working.
Thank you.
Vasu.

Here is an example of this using 11g. Note you will need to login programatically if data is secured.
// Create search service and set SOAP URL
OracleSearchService searchService = new OracleSearchService();
searchService.setSoapURL("http://myserver:7777/search/query/OracleSearch");
// Get data group to search
DataGroup dataGroup = new DataGroup();
dataGroup.setGroupName("MyGroup");
DataGroup[] dataGroups = new DataGroup[1];
dataGroups[0] = dataGroup;
// Get list of all attributes to fetch
Attribute[] attributesAll = searchService.getAllAttributes("en");
ArrayList<Integer> attributeIds = new ArrayList<Integer>();
for(Attribute a: attributesAll)
     attributeIds.add(a.getId());
Integer attributeIdArrayAll[] = new Integer[attributeIds.size()];
attributeIdArrayAll = attributeIds.toArray(attributeIdArrayAll);
// Create filters (BE SURE THE FILTER ID IS CORRECT - I do not suggest you hard-code it but rather iterate through list of all attributes above and get ID that way)
Filter[] myFilters = new Filter[2];
myFilters[0] = new Filter(124, "Number", "EQUALS", "129224");
myFilters[1] = new Filter(124, "Number", "EQUALS", "123730");
// Query (BE SURE TO USE "or" as the operator between filters)
OracleSearchResult result = searchService.doOracleSearch("", 0, 50, false, false, dataGroups, "en", null, true, "or", myFilters, attributeIdArrayAll);
// Get count
int hits = result.getEstimatedHitCount().intValue();
// Print results
ResultElement[] resElements = result.getResultElements();
for(int i = 0; i < resElements.length; i++)
// Get document
ResultElement doc = resElements;
Hope this helps!

Similar Messages

  • Read multiples files with same extension

    how to read multiples files with same extension in java.
    for ex : i would like to read all .DAT files from C drive using java.
    How is it done

    - You create the filter
    - You get the list of files
    - You open and read each file.
    For the first two above you look at java.io.File and listFiles(FileFilter filter).
    For the third you find whatever input stream is appropriate from java.io.*

  • Can we create same party site with same customer in different OU

    I am able to create same party sites with same customer in different Operating Unit through front end but I am not able to do so using TCA Api HZ_CUST_ACCOUNT_SITE_V2PUB.create_cust_acct_site .I am getting the below error 'Value for cust_account_id - party_site_id must be unique'.Ineed to migrate customer details from one OU to another OU and the party site number need to be same .Can anyone suggest a way in which I can do the above ?
    Reeja

    We can create multiple customer acct site across different OU pointing to same party_site_id with API's also. I am sure that you have initialise the org context in your code somewhere and thus its giving you this error. Reinitialise the org to target org before calling this API.
    Thanks
    Amit Singh

  • Adding Multiple Records with Express

    Hello All,
    We have a CRUD application written in Express 2.0 that allows users to
    enter part numbers and associated information. Our part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P' number variations :
    1 AB 2 P3 for example. We have provided functionality to allow the
    user to enter multiple P or M variations all at once, say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass needed to be
    passed to the Save method, however, the Save method adds only the
    initial record (the one from the original Express data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update method called
    from
    Save. I believe I am missing some query information that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to provide this.
    As you can see in the attached code, we are using the LogAttr method to
    post
    changes. Apparently this is not enough. What am I missing here?
    The InstanceStatus key of the added records is set to ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail: [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105

    Hi There,
    If attr is not specified in your LogAttr() call, the
    BusinessClass
    will be put in the update state but not attributes will
    be logged.
    That may be the reason why only the displayed record(
    fetched from
    the DB ) is getting logged, but not the new records.
    I think you should use ATTR_SIMPLE with LogAttr. This
    will cause
    all the attributes to be logged and a proper query to
    be built
    to insert the newly created record. I am no Express
    Guru,
    but it works fine for me. Also, try not to modify
    InstanceStatus directly.
    Sometimes it might lead to inconsistencies. The online
    help
    The Add Records to Save example really helps.
    Good luck!
    Ajith Kallambella. M.
    Forte Systems Engineer,
    International Business Corporation
    -----Original Message-----
    From: Scott Guman [SMTP:[email protected]]
    Sent: Wednesday, September 16, 1998 9:34 AM
    To: 'Forte Users'
    Subject: Adding Multiple Records with Express
    Hello All,
    We have a CRUD application written in Express 2.0 that
    allows users to
    enter part numbers and associated information. Our
    part numbers are
    structured as a prefix, alpha, suffix and 'M' or 'P'
    number variations :
    1 AB 2 P3 for example. We have provided functionality
    to allow the
    user to enter multiple P or M variations all at once,
    say 1 AB 2 P1 thru
    P100,
    using a dialog box where they enter the starting
    number, ending number
    and step.
    The problem comes in the AddRecordsToSave method.
    This method correctly builds the array of BusinessClass
    needed to be
    passed to the Save method, however, the Save method
    adds only the
    initial record (the one from the original Express
    data entry screen)
    to the database.
    I have traced the problem to the BusinessClient.Update
    method called
    from
    Save. I believe I am missing some query information
    that should be
    built into
    AddRecordsToSave, but I am completely unsure of how to
    provide this.
    As you can see in the attached code, we are using the
    LogAttr method to
    post
    changes. Apparently this is not enough. What am I
    missing here?
    The InstanceStatus key of the added records is set to
    ST_EMPTY by
    default....
    I have tried forcing this to ST_UPDATE, only to receive
    an error that it
    should
    be ST_EMPTY......?? I am confused. If anyone can shed
    some light on this
    for me,
    I would appreciate it. Thanks for any help.
    Scott Guman E-mail:
    [email protected]
    IRM Analyst II Phone: (610) 709-2144
    Mack Trucks, Inc. Fax: (610) 709-4713
    Allentown, PA 18105
    << File: AddRecordsToSave.txt >>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Multiple accounts with same email

    I have multiple accounts with same email
    The one that has all my contacts is the one attached to FB but for some odd reason I can no longer access this specific account
    When I try to reset my password, it only keeps asking me to change my FB password
    Once I try logging in on Skype, it keeps asking my FB to connect to the other 2 Skype accounts, completely diffente usernames
    I am only interested in the one that originally connected to my FB as it has all my contacts
    As my other 2 accounts are my old Skype accounts and have my old contacts from years ago

    Actually this morning I was able to log on the account from an iPad with no fuss but the pc refuses to sign in^^^!???! "Skype couldn't connect" - What is going on???
    I also found out that I could sign in via a browser but not via skype program... So I uninstalled it and installed it again and it's working now...
    I have now changed the email so I don't have 3 accounts with the same primary email as Skype seems to not being able to handle multiple accounts with same email!!!

  • Multiple members with same alias

    I have multiple members with same alias name. Are there anyway to build dimension members with same alias name?

    Typically I will concatinate the member name (as either a prefix or suffix ) to the Alias to make it unique

  • Mounting multiple directories with same name on different severs to a single mount point on another server

    We have a requirement where in we have multiple solaris servers and each solaris server has a directory with the same name.
    The files in these directories will be different.
    These same name directories on multiple severs has to be mounted to a single directory on another sever.
    We are planning to use NFS, but it seems we can not mount multiple directories with same name on different severs to a single mount point using NFS, and we need to create multiple mount points.
    Is there any way we can achieve this so that all the directories can be mounted to a single mount point?

    You can try to mount all these mount points via NFS in one additional server and then export this new tree again via NFS to all your servers.
    No sure if this works. If this works, then you will have in this case just an additional level in the tree.

  • Multiple accounts with same email can't acces original account

    ok, so i created a new skype. I was messing with skype account on my desktop and wound up unlinking and re linking the account basically i made 2 extra accounts and they have my live: random.namehere_1 and live: random.namehere_2 and i cant log into my original one anymore also when i try to do a recovery it says i have 2-3 skype accounts on my email and i cant log into my accounts by typing in the live:random.namehere and the  password it just says ooops something went wrong basicallly saying the pw and account name are wrong when they arent i made sure of it. so how do i eliminate the cloned accounts and log into the main one.  

    Actually this morning I was able to log on the account from an iPad with no fuss but the pc refuses to sign in^^^!???! "Skype couldn't connect" - What is going on???
    I also found out that I could sign in via a browser but not via skype program... So I uninstalled it and installed it again and it's working now...
    I have now changed the email so I don't have 3 accounts with the same primary email as Skype seems to not being able to handle multiple accounts with same email!!!

  • Using Rich Text Editor with a Custom Attribute

    Hello All,
    Can anyone please tell me as how can I use the Rich Text Editor with a Custom Attribute?
    I want to create a custom attribute based on text datatype, but when entering the value for this attribute in a Custom Item, portal shows a normal textarea. I want that the user should see the Richt Text Editor.
    Thanks for help.
    Regards

    Hi,
    Can you tell me what steps you are using to produce this, and which Portal version you are using. When I tried it, I wasn't able to reproduce it. Here are my steps:
    1) Created Custom Item Type, based on Text, under
    Page Groups > Shared Objects > Item Types
    2) Selected Three attributes (Description, Name, Publish Date). Note Text and Display Name were already selected
    3) In Add Item Wizard, configured list to allow for my
    custom item type selection.
    4) Then I was able to see the Rich Text Editor when editin
    my custom item type.
    Regards,
    J.

  • Bridge CS4 won't output to pdf multiple images with same filename

    Hiya...my googling efforts have thus far failed!
    I've got CS4, and in Bridge, I created a New Smart Collection to find all filenames in a folder containing "." or ".jpg" - which in turn searched through all the subfolders like what you used to be able to do in Photoshop CS3.  Very simple stuff, but all the images are jpg's, but in multiple folders (I don't want to move them out of the folders, as the files came from an external source, and there are heaps of folders, and I don't want to pdf each subfolder seperately as it will take forever).
    The problem is that some of the files have the same filenames (again I'd prefer not to rename, as it happens a lot on this project, and they are all over the place).  So whilst Bridge will show the thumbnail images correctly in the content tabbed screen in my New Smart Collection, but once I've done the Output to PDF thing, for example, instead of showing both different images it has pdf only the first image but repeated it twice.  And this happens multiple times throughout the pdf, the more times the same filename is used, the more times the first image gets repeated.
    I know that it is messy to have multiple similar filenames, but why can't bridge just place the image anyway?  It allocated a space for it on the pdf and does show it in bridge, it just doesn't seem to survive the transfer to pdf well.
    The only other thing that I have done is use the below link (which was posted on another adobe forum thread) to create a custom pdf output template (nothing too fancy, just number of rows / columns, size, font etc).  But I've tried using the standard bridge templates and it does the same thing.
    http://www.proficiografik.com/2009/08/03/save-custom-pdf-output-template-in-adobe-bridge-c s4.html
    Any help would be appreciated...even if to tell me that I am being unreasonable!
    UPDATE 16/11/09
    Just to let you know that I seem to have resolved the bug inadvertently with one of the Adobe updates. The below is the link for the AdobeOutputModule-2.1-mul-AdobeUpdate.zip which was released on 2/19/2009 - which allows for headers & footers to be placed in the Ouput pdf. I finally installed it today, and everything seems to be working fine now (i.e. I can pdf multiple images with the same filenames and the pdf will actually show each different image rather than repeating only 1 of the images).
    Must have been a fix installed in the contact sheet templates that get installed with the update - not sure why the original version was corrupted, but I've left that with the Adobe guys (I submitted a bug report - and they were able to replicate the problem but hadn't fixed it as yet).
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=4228
    Message was edited by: djtun71 (16/11/09)

    When I click import from disc I am asked to choose a disc and then I get this message:
    The following photos will not be imported because they are already present in the catalog. To see these photos in the catalog select 'Show in Library' (the import will be canceled).
    This is followed by a long list of images. If I click 'Show in Library' I can see all the images with the same filename. And then they start to automatically write over those images with images from the disc. However they keep the same metadata and keywords from the previous images. If I click on Import and deselect the "don't reimport suspected duplicates" box, it imports only the images that don't share filenames and none of the images that do.
    Is there a way of setting the "Don't reimport suspected duplicates" box in preferences?

  • Multiple files with same name--- automatic renaming option??

    I am trying to sort my files by adding multiple files to a single folder. However, many have the same filename, and I get the error " there already exists a file with the name "x", please choose another name" etc. I am dealing with thousands of files here that are very tedious to rename individually. Is there an option or program that either disables this block on multiple files with the same name in a common folder, or automatically renames the files as they are placed in the folder?

    i would like all the files to have different names, but not have to do it myself. they are generated my my audio recorder, which automatically names files take1, take2, take3 etc. multiple sessions entail multiple folders, i am trying to consolidate.

  • ARD won't save multiple computers with same IP and different port!

    I'm trying to access multiple computers over the internet behind a firewall with port forwarding.
    I can access each computer, but ARD won't save the IP address and port (in IP Address column of ARD 3.1) of multiple computers with the same IP address. It will only save ONE. I've tried 'add by address', adding a list for each computer or adding a list for all those computers. Nothing has worked. ARD will actually change the first computer's IP address to 0.0.0.0
    Example: Static IP address
    Computer 1 xx.xxx.xxx.xxx:51 (public port 51 is forwarded to port 5900 on computer 1)
    Computer 2 xx.xxx.xxx.xxx:52 (public port 52 is forwarded to port 5900 on computer 2)
    Computer 3 xx.xxx.xxx.xxx:53 (public port 53 is forwarded to port 5900 on computer 3)
    Has Apple really overlooked this or am I missing something? Isn't this how most people would remotely manage multiple Macs offsite?
    Thanks

    ARD cannot do this as you're asking. If your
    workstations get their addresses from an NAT device
    rather than being "real", the ports also need to be
    forwarded in the router to the workstation's internal
    IP address. ARD uses port 3283 for the reporting and
    updating function, so if your Macs are getting their
    IP addresses through NAT, since you can only forward
    a port to a single workstation, you can only get
    reports, push package/files to etc. for a single
    workstation.
    ARD uses the VNC protocol for observation and
    control, though, and there are a range of IP
    addresses for that protocol, starting with 5900. ARD
    uses 5900 by default, so that port would be forwarded
    to the first workstation. You would, I believe, need
    to install VNC servers on the systems (since the ARD
    client cannot listen on any port other than 5900
    while VNC servers can be set for other ports such as
    5901, 5902, etc. You would then forward 5901 to the
    second workstation (and on to 5902, 5903, etc.). You
    can then use the following information:
    Remote Desktop 2: How to specify a port number
    for a VNC client
    to connect.
    The only other options are: 1) to run the ARD
    administrator on a workstation on the network, and
    then take control of that system from outside, either
    via VNC or another copy of ARD, or 2) set up a
    virtual private network (VPN) so that when you
    connect from outside, your admin system is officially
    part of the local network.
    Hope this helps.
    That definitely helps. I have ARD installed on my MBP and on a workstation on the LAN. I have used ARD from the MBP to control ARD on a workstation on the local network, but it can get a little tricky. I already have VNC setup on all the workstations. I used to use COTVNC prior to purchasing ARD 3.1.
    I guess what I'm really asking is...
    How do I add a list of workstations and save the settings (same IP address for each workstation with different ports?) to control/VNC via ARD?
    I simply want a list that shows each workstation, so I can control/VNC them using ARD offsite.
    Name: Computer 1 IP Address: 123.123.123.123:5901
    Name: Computer 2 IP Address: 123.123.123.123:5902
    Name: Computer 3 IP Address: 123.123.123.123:5903
    I don't want to have to manually type in the IP address into ARD every time.
    Will ARD simply not add another computer to the list if it has the same IP address but different port number as a computer already on the list? I haven't been able to find a way to make ARD do this.

  • Podcast synching on multiple macs with same account

    How do I get my podcasts to synch on multiple macs and therefore ipods with same itunes authorized account, ie the subscriptions I have on home computer don't show up on my work itunes account and therefore when I'ved watched flying one way, when I land I want to load the next set of episodes, but find the need to create entirely new subscriptions?
    Thanks
    george

    I was able to resolve the problem using addMessageCountListener and messagesAdded method, as suggested by you.
    I am now facing another problem. Whenever a new message is received, code inside messagesAdded method gets executed. Here I am trying to spawn another thread and do some stuff. But this new thread is not starting at all. It goes into some JavaMail:EventQueue and does nothing. What is the concept of EventQueue here? How can I get this new thread executed?
    Also will there be synchronization problems in messagesAdded method. Say I received a message and I am processing it in the messagesAdded method. In the mean time another message comes up. How will this behave.

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Multiple Servers with same Remote Interface?

    Is it possible to declare the same remote interface on multiple RMI servers? Secondly, is it possible to pick which RMI server will manage a particular request?
    In other words, imagine if multiple servers could service a particular request that has the same signature, but the client wants to specify which server to send the invocation. An example would be the following:
    public String getPhoneNumber(String pLastName) ;But the client should decide that server A should manage requests of last names starting with A-G, server B should handle H-P, and server C should handle Q-Z. The remote method invocation is the same, but the server upon which is should be invoked needs to be determined at runtime.
    I realize this can be done multiple ways, with an interim proxy server that designates the server. However, I'm most interested in the ability within the RMI and/or JNDI standard to select and invoke methods on a particular server.
    Thanks for any help.

    "Server" is a little bit vague in this context.
    My assumption is that you want separate RMI servers running on separate hosts. (Otherwise, why bother with multiple "servers"?)
    That being said, it's not clear to me how you would expect RMI to sort out something as application-specific as you suggest. It sounds to me like you need your own registry/redirector. This is going to either be an rmiregistry rewrite by you, or - as was suggested by another poster - a proxy.

Maybe you are looking for

  • How to inactivate categories in the BP eventgroup CREATE in PCUI?

    Hi all, I need your help. At the application CRMM_ACCOUNT in PCUI CRM 5.0 we need to inactivate the categories PERSON and GROUP for one userrole. The other roles should be able to choose all three entries PERSON, ORGANIZATION and GROUP. Our first ide

  • Main image not altered, but thumbnail is?

    im using a free trial of lightroom and when i try and adjust an image i.e, exposure etc where it makes a noticeable difference, only the thumbnail image in the top left changes. i.e darkens or brightens with exposure changes. the only way to apply th

  • Exchange 2013 CAS server returned '500 Message rejected'

    Hi, all. Exchange 2013 with CAS server and 2 mailbox servers. Health checks are all 100% healthy. One of our users cannot receive email from an external user. Our CAS server keeps rejecting the message. I can trace the message and see that it did ind

  • Display website in xcelcius dashboard

    I want users to select a website name from a -say list box, which consists of website urls- say google, yahoo, etc. The selected website should then load in another component or container in the same canvas. I am using xcelcius 2008. Regards Chris

  • Watch instead of download movies on the iPad

    Hello, with some movies in the itunes store, I get a watch button instead of download. These are movies I've allready purchased. Why does this happen and, how can I get my other movies to be set to watch as well? thanks, josh