How to combine a content search with an attribute search with the API

Hi
I have been working with searches in Content Services using the API and I have successfully set up the search over the contents of a document and inside of the Category attributes of the document.
My problem comes when I try to combine this 2 kinds of search, that is when I want to find all the documents that cointain the text "test" and at the same time contain other text into their category attributes.
What I do is to build 2 SearchExpression's one for the content search and the other for the attributes search and then joining them in a third SearchExpression object using the FdkConstants.OPERATOR_AND. When I search using only the first or the second SearchExpression everything works fine. But when I do the search using the third SearchExpression an ORACLE.FDK.ParameterError:ORACLE.FDK.InvalidSearchExpression
exception id raised.
The code I'm using is like this:
private SearchExpression getMainSE(String contentQuery, CategoryInfo catInfo)
     SearchExpression contentSE = null;
     SearchExpression catSE = null;
     SearchExpression mainSE = null;
     if(contentQuery != null)
          contentSE = this.setupSE4Contents(contentQuery);
     if(catInfo != null)
          catSE = this.setupSE4Category(catInfo);
     if(contentSE != null && catSE != null)
          mainSE = new SearchExpression();
          mainSE.setLeftOperand(FdkConstants.OPERATOR_AND);
          mainSE.setLeftOperand(catSE);
          mainSE.setRightOperand(contentSE);
     else
          mainSE = contentSE != null ? contentSE : catSE;
     return mainSE;
CategoryInfo is one class made by my own that contains the categoryId of the document and a List of the attributes where I want to search. mainSE is the SearchExpression that is returned.The portion of code that appears to be having problems is this:
if(contentSE != null && catSE != null)
     mainSE = new SearchExpression();
     mainSE.setLeftOperand(FdkConstants.OPERATOR_AND);
     mainSE.setLeftOperand(catSE);
     mainSE.setRightOperand(contentSE);
And finally I only execute the search using the mainSE returned by the function:
// Define search options
NamedValue[] nv = WsUtility.newNamedValueArray(new Object[][] {
     { Options.FOLDER_RESTRICTION,
          folder != null ? new Long(folder.getId()) : null },
     { Options.SEARCH_VERSION_HISTORY, Boolean.TRUE } });
     SearchExpression mainSE = this.getMainSE(contentQuery, catInfo);
     try
          // Search documents
          NamedValue[] result = sem.search(mainSE, nv, null);
          // etc....
Is this the correct way to combine a content search with an attribute search???
I know that this is possible since I have seen that it can be done in the Collaboration Suite UI.
I hope yoy can help me...
Thanks in advance

Not sure if this is a typo (while pasting code on the forum) or is the cause of the problem you describe.
Shouldn't mainSE.setLeftOperand(FdkConstants.AND) be replaced by mainSE.setOperator(FdkConstants.AND) ?
Ravikiran

Similar Messages

  • Export with BiarEngine.jar works, using the API it throws an exception

    Hello,
    I'm using BiarEngine.jar to export from my CMS. it works fine.
    Now I want to use the API to get someting more handy, but I receive an exception (NoSuchFieldError) as if I had a mismatch between versions.
    I'm stuck with it, if somebody has an idea...
    Thanks a lot.
    Alain
    Here is the java code:
    IExportOptions oExportOptions = BIARFactory.getFactory().createExportOptions();
    oExportOptions.setIncludeSecurity(false);
    oExportOptions.setIncludeDependencies(true);
    oExportOptions.setCallback(
         new IExportCallback()
              public void onSuccess(int id)      {...}
              public void onFailure(int id, BIARException biarException) {...};
    BIAROutput oBIAROutput = new BIAROutput( oEntrepriseSession, "c:\myFile.biar", exportOptions );
    At this point it throws the exception:
    Exception in thread "main" java.lang.NoSuchFieldError: SI_MODELCUID_SET
         at com.businessobjects.sdk.plugin.desktop.deltastore.internal.DeltaStore.setupProperties(DeltaStore.java:188)
         at com.businessobjects.sdk.plugin.desktop.deltastore.internal.DeltaStore.unpack(DeltaStore.java:37)
         at com.crystaldecisions.sdk.occa.infostore.internal.al.continueUnpack(Unknown Source)
         at com.crystaldecisions.sdk.occa.infostore.internal.al.startUnpack(Unknown Source)
         at com.crystaldecisions.sdk.occa.infostore.internal.InternalInfoStore.queryHelper(Unknown Source)
         at com.crystaldecisions.sdk.occa.infostore.internal.InternalInfoStore.query(Unknown Source)
         at com.crystaldecisions.sdk.occa.infostore.internal.at.query(Unknown Source)
         at com.businessobjects.sdk.biar.internal.XSDManager$RepositoryXSD.retrieveXSDVersions(XSDManager.java:204)
         at com.businessobjects.sdk.biar.internal.XSDManager$RepositoryXSD.<init>(XSDManager.java:194)
         at com.businessobjects.sdk.biar.internal.XSDManager$XSDCache.getXSD(XSDManager.java:365)
         at com.businessobjects.sdk.biar.internal.XSDManager.<init>(XSDManager.java:55)
         at com.businessobjects.sdk.biar.BIAROutput.<init>(BIAROutput.java:73)

    >
    Just need to confirm if the ANT script can be run against individual OSB project than OSB configuration project?
    >
    It is possible. I'm going the same way here. However, I remember I needed to contact support because it was not a standard feature of the Ant task. They provided me with the patch that allowed me to use -configSubProjects parameter in export.
    >
    Can we have multiple OSB configuration projects on the OSB server ?
    >
    I don't think so.

  • How do i place content in a sliding panel one beside the other?

    my site: www.islamobec.com
    how can i populate my sliding panel by placing content beside each other??

    The following is an example of a two content slide http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample2.html
    Gramps

  • How to combine multiple columns into one column and delete value the row (NULL) in sql server for my example ?

    My Example :
    Before:              
    Columns
    name               
    address          
                   jon                      DFG
                   has                     NULL
                   adil                      DER
    After:                  
    Column 
                                    Total   
                      name : jon , address : DFG
                      name : has
                      name : adil , address : DER

    Why not doing such reports on the client site?
    create table #t (name varchar(10),address varchar(20))
    insert into #t values ('jon','dfg'),('has',null),('adil','der')
    select n,case when right(n,1)=':' then replace(n,'address:','') else n end
    from
    select concat('name:',name, ' address:',address  ) n from #t
    ) as der
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I delete content from a drop zone without deleting the drop zone?

    I can't seem to figure this out, and I feel silly about it!  Your help is much appreciated

    Select the drop zone layer and then in the inspector image tab click on the clear button at the bottom.

  • How to combine TrivialPageFlowEngine with JAZN XML-based provider ?

    With help TrivialPageFlowEngine possible will limit access to pages, and also to set pages for logon. However, JAZN XML-provider provides the same functionality. How to combine these two approaches

    Rustam,
    can you help me with "TrivialPageFlowEngine"? Where can I get documentation for it to have a quick lokk before replying to your request. Oracle9iAS JAAS (aka JAZN) is based on the Java Authentication and Authorization Service and implements it's own provider.
    If you look in the OC4J demos for jazn, there are two samples explaining how to setup JAZN (If installing OC4J with Oracle9iDS or Oracle9iAS then jazn already is defined to be the default provider).
    If e.g. you use Oracle9iAS and configure (and deploy) a Servlet for basic authentication, then this automatically is performed by the Oracle Single Sign-on server (if configured for OID) or direct jazn-data.xml (if not using OID). All your code needs to do is to get the authenticated principal's name.
    From your posting it is not clear if you require authentication or authorization alike. Authorization requires permission classes to be written and assigned.
    Fran

  • How to combine Tables GLPCA & GLPCP

    Hi All,
    I have a requirement to show Actual and Plan values for Material and GL Accounts in a Report.
    The Actual values come from GLPCA table and the Plan values come from GLPCP table. But the problem is that the GLPCP table continas the values on period basis.
    Could you please help me find a solution on how to combine data from these 2 tables and display in the report.

    Hi Sandeep
    We had the same scenario in our project too. Our approach was - We create two independant DSOs, one for holding data from GLPCA and another from GLPCP. Please note GLPCA will contain data at the lowest denomination meaning at the day level, whereas GLPCP will contain at the period level. In order to achieve reporting from both we created a multiprovider where fiscal period from both the DSO's was included in the multiprovider (do not include calendar day) so that when you report GLPCA data will be aggregated at the period level and GLPCP data already at the period level will both be shown in a single row with common characteristics like Profitcenter, material, Customer etc.
    I hope this helps.
    Thanks.

  • How to combine this query so that i can display the ouput together

    I have no idea how to combine this query together.Someone please help.I want the ouput to display oni 1 result combining all together.
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('6910','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('6912','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('7344','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('8344','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    Edited by: 965547 on Nov 5, 2012 12:55 AM

    The only difference which i am seeing in your queries is the Operation ('6910', '6912','7344','8344')
    Then why don't you put all values in One like this
    Select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in *('6910', '6912','7344','8344','7976')* AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    Hope this will resolve your problem.
    Oracle-911

  • HT201274 how to erase all content and settings

    how to erase all content and settings

    Ummm..Really?  Read the first line in the article that you referenced above when posting your question.

  • How can we access the value set to a search criteria's attribute

    Hi guys,
    Is there any way to access the value which was set to a search criteria's attribute programmatically in the backing bean?
    Regards !
    Sameera

    Check sample 85 from the adf code corner sampleshttp://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf
    Frank shows how to access the variables.
    Timo

  • Iphoto - when exporting photos with their titles,iPhoto changes the manual sequence that I have given and imposes an alphabetical sequence

    Mac mini
    Processor  2.5 GHz Intel Core i5
    Memory  8 GB 1600 MHz DDR3
    Graphics  Intel HD Graphics 4000 768 MB
    Software  OS X 10.8.5 (12F45)
    When exporting a group photos with their individual titles, iPhoto changes the manual sequence that I have given and imposes its own sequence (which seems to be alphabetical).  The export dialogue box allows me to use my titles or to impose a numerical sequence.
    How can I keep my titles and the sequencing that I had carefully worked out?

    What you are missing is that files have no order - you view them using a program and that program creates the order
    When viewing in an iPhoto album you can sort manually and iPhoto will display the photos as you sorted them - but when you move to a different program (the finder for example) you have a totally different set of sorts available - for example in the finder the same set of files can be viewed in alpha order, in size order, in date modified order, etc - none of those are inherent in the file but are sorts set under the view menu 
    So to meet your requirements you must export with file attributes that allow the finder view options to present your desired view - which is what volunteers here have tried to help with - even though it really does not involve IPhoto in any way
    LN

  • Search for display attributes in Web reporting

    Hello,
    When I execute a query in Excel, in the variable entry screen, I can search values for material, for example, using some display attributes as Colour or Size. I mean, I want to execute the report for materials whose colour is white. I can open the matchcode for Material, I select the value "white" for the Colour display attribute, and I get a list of all the materials with that colour. The report is executed for those materials.
    However, when I execute the same report using Web reporting, I don't have the display attributes in the selection screen, to restrict the material. Once the report is executed, in the Navigational block, if I filter the material, there is an option called "Search for display attributes activated", where I can restrict per Colour, but only for one value.
    I have two questions related to this topic:
    1) Is it possible to have the functionality "Search for display attributes activated" in the variable entry screen, for Web reports, in the same way it is available in the reporting via Excel?
    2) Is it possible to configure that functionality, in order to restrict several values for the display attribute at the same time (in my example, for Colours "white", "black" and "red" at the same time)?
    Thanks very much for your help
    Patricia

    Hi Patricia,
    Looks like you have some new navigational attribute requirements, don't you think? I'm sure that would solve your issue, though maybe you're trying to avoid using navigational attributes (it is usually said that using navigational attributes is slower).
    Maybe you can do a test on BEx to check if your query is considerably slower when filtering directly by material code (by filtering on the selection screen using display attributes) or using a navigational attribute.
    Match codes on web reporting have lost some functionalities compared to BEx (such as importing a list of values from a file, for instance).
    Regards,
    David.

  • How can we create a Collective search help  plz tell me with steps

    How can we create a Collective search help  plz tell me with steps
    thanks,
    basu

    Hi
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11  Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    Reward points for useful Answers
    Regards
    Anji

  • I have a macbook pro with OSX 10.9.3 and Safari 7.0.4. How do I remove BING FROM SEARCHING when i type something into the search bar

    I have a macbook pro with OSX 10.9.3 and Safari 7.0.4. How do I remove BING FROM SEARCHING when i type something into the search bar

    See below if the search engine setting was changed without your knowledge and you can't change it back.
    You installed the "Genieo/InstallMac" rootkit. The product is a fraud, and the developer knowingly distributes an uninstaller that doesn't work. I suggest the tedious procedure below to disable Genieo. This procedure may leave a few small files behind, but it will permanently deactivate the rootkit (as long as you never reinstall it.)
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data. You must know how to restore from a backup even if the system becomes unbootable. If you don't know how to do that, or if you don't have any backups, stop here and ask for guidance.
    Step 1
    In the Applications folder, there may (or may not) be an application named "Genieo". Genieo may be partially installed even if this item is absent. If it's present, select it and open the Finder Info window. If it shows that theVersion is less than 2.0, download and install the current version from the genieo.com website. This may seem paradoxical, since the goal is to remove it, but you'll be saving yourself some trouble as well as the risk of putting the system in an unusable state.
    There should be another application in the same folder named "Uninstall Genieo". After updating Genieo, if necessary, launch "Uninstall Genieo" and follow the prompts to remove the "newspaper-style home page." Restart the computer.
    This step does not completely inactivate Genieo.
    Step 2
    Don't take this step unless you completed Step 1, including the restart, without any error messages. If you didn't find the Genieo application, or if you couldn't complete Step 1 for any reason, stop here and ask for instructions.
    Triple-click anywhere in the line below on this page to select it:
    /Library/Frameworks/GenieoExtra.framework
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.
    If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder should open with an item named "GenieoExtra.framework" selected. Move that item to the Trash. You'll be prompted for your administrator password.
    Move each of these items to the Trash in the same way:
    /Library/LaunchAgents/com.genieo.completer.update.plist
    /Library/LaunchAgents/com.genieo.engine.plist
    /Library/LaunchAgents/com.genieoinnovation.macextension.plist
    /Library/LaunchDaemons/com.genieoinnovation.macextension.client.plist
    /Library/PrivilegedHelperTools/com.genieoinnovation.macextension.client
    /usr/lib/libgenkit.dylib/usr/lib/libgenkitsa.dylib
    /usr/lib/libimckit.dylib
    /usr/lib/libimckitsa.dylib~/Library/Application Support/com.genieoinnovation.Installer~/Library/LaunchAgents/com.genieo.completer.download.plist
    ~/Library/LaunchAgents/com.genieo.completer.update.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those listed above, move them as well. There's no need to restart after each one. Some of these items will be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    Restart and empty the Trash. Don't try to empty the Trash until you have restarted.
    Step 3
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including ones called "Genieo" or "Omnibar," and any that have the word "Spigot" or "InstallMac" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Your web browser(s) should now be working, and you should be able to reset the home page and search engine. If not, stop here and post your results.
    Make sure you don't repeat the mistake that led you to install this software. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad has a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If youever download a file that isn't obviously what you expected, delete it immediately.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Genieo developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    Finally, be forewarned that when Genieo is mentioned on this site, the perpetrator of the scam sometimes shows up under the name "Genieo support." He will tell you to run the provided uninstaller. As he knows and intends, the uninstaller does not completely remove the malware.

  • How to implement two different websites with one section that has the same content?

    I have two sister websites, each for a separate but related department in a hospital. On each of these websites, I have a main tab called library, which has about 30 pages within it for related healthcare issues. The library is the exact same content on each site, but the main navigation and header for the site is obviously different. I have been upkeeping this identical content on both sites (if something is changed, then I have to do it twice). This isn't efficient and I would like to find a way to combine them somehow. I don't have a ton of experience but I catch on pretty quickly and I basically need ideas for the best way to handle this. I have considered creating a third site, and the library tab on each of the other sites would take you to this new site. I have also wondered if there is a way to embed duplicate content into two separate pages (maybe with an iframe). That way I would update the original file and it would be updated on both sites.
    The sites also have different body sizes. One is 960 pixels wide and the other is 690 because it has a sidebar that makes it smaller. How would you all recommend I handle this? I use Dreamweaver CS6 and my pages are all HTML

    I looked into Server Side Includes and I think I would like to try it, but I can't seem to get it working. The problem is both of my sites are under a separate domain but hosted the same way I believe. For instance, I have two dreamweaver sites, but when I use my FTP, I have one large folder for the main site, then the sister site is in a folder within the main site folder. Although you can get to the main site using www.ukneurology.com, you can also get to the site using kyneurosurgery.com/neurology/index.html. I think this is what is messing me up because I can't seem to get it to work right.

Maybe you are looking for

  • AppleScript-based rule only works manually

    Greetings, I have set up numerous Rules to automatically move messages to specific folders, based on Subject headers. These work automatically, as new mail comes in. However, one of my Rules is set up to "Run Applescript." The script deals with a sin

  • Photosmart 4480 False Jams

    K, this printer has just been FRUSTRATING! I've searched everywhere online for answers, including HP support and all that jazz, but to no avail. My problem is, every time I turn on the printer and try to print anything at all, I get a "Paper Jam" err

  • Error only in Internet Explorer

    The index page of www.bingnathan.com plays just fine in FF, Safari, and Chrome, but I get an error message in Explorer: MuseJSAssert: Error calling selector function: Reference error: 'PIE' is undefined Any suggestions? When I click the message off,

  • ADS configuartion error

    Hello All, I am configuring the ADS in our ECC 6.0 system . I am facing two issues : Issue 1: I had completed all the steps for configuring ADS in the system. But when I run the Adobe form builder test from sfp transaction for the test form "FP_TEST_

  • Adjusting Balance in iTunes

    I have a slight hearing loss in my left ear. Is there a way to raise the volume in the left channel to compensate? Everything sounds like it is to the right. And can this "off balance" be transfered to an iPod Classic? Chim