How do I make simplesearch look for the same tag in multiple locations

Currently i'm trying to write a simplesearch implementation that will only return the result it if contains a specific tag. I would also like to include DAM assets in the search, wherein lies the problem:
I need to look in both jcr:content and jcr:content/metadata for the tag, and if the tag is found in either location, return that page. Here is the code I am trying to use, but it currently only looks for the tag(s) in one location. Any tips on how to get it to look in multiple locations?
Code:
                    tagPredicate = new Predicate("tags2", "tagid");
                    tagPredicate.set("property", "jcr:content/cq:tags");
                    for (Cookie cookie : tagsFromCookie) {
                                   if (cookie.getName().contains(CREDENTIALS)) {
                                                  tagPredicate.set("tagid",
                                                                      (cookie.getValue().replaceAll("---", ":")));
                                                  search.addPredicate(tagPredicate);
Thanks for any help you can give!

I figured this one out on my own. Kind of a "Doh!" moment.
What I ended up doing is this: I created a PredicateGroup, and populated this group with the predicates I needed. Then, I set the PredicateGroup allRequired to false. Voila! It works!
Code:
          PredicateGroup tagPredicateGroup = new PredicateGroup();
                    tagPredicateGroup.setAllRequired(false);
                    Predicate tagPredicate = new Predicate("tags", "tagid");
                    if (slingRequest.getParameter(GROUP1) != null) {
                                   tagPredicate = new Predicate("tags", "tagid");
                                   tagPredicate.set("property", "jcr:content/cq:tags");
                                   tagPredicate.set("tagid", GROUP1);
                                   tagPredicateGroup.add(tagPredicate);
                                   tagPredicate = new Predicate("damTags", "tagid");
                                   tagPredicate.set("property", "jcr:content/metadata/cq:tags");
                                   tagPredicate.set("tagid", GROUP1);
                                   tagPredicateGroup.add(tagPredicate);
                    return tagPredicateGroup;

Similar Messages

  • Hi experts, how i can make confirmed quantity for the same day ???

    Hi experts, how i can make confirmed quantity for the same day ???
    regards,
    uday

    Hi Joao/ Phani,
    I have created a sales order in my IDES system with VA01 today and the delivery dates is confirmed for tomorrow ie 21st.
    My Question is how can i change the confirmed delivery date for the same day ???

  • I know how to make firefox 12's tabs go to the bottom, but even so they still dont look exactly as they did in 3.6, how do I make them look exactly the same?

    Considering a few websites stopped working for me seeing as I was still using 3.6.X, I reluctantly decided to finally upgrade today, and it automatically upgraded to version 12. Needless to say, I wanted it to look exactly as it did in 3.6.26, and I spent a good portion of the day tinkering with various add-ons and the like to get things back the way they were. One thing is still bugging me though, the tabs, which I managed to get to the bottom of the screen, still dont look exactly as they did. There used to be a small dividing line between the tabs and the actual page, and the + on the new tab button was smaller (and I know this all seems rather picky, but it does bother me). And while I'm at it, is there any add-on that will give me the same back/forward, X, refresh, and home icons as 3.6.26? Any help is greatly appreciated. Thank you.

    Try this extension for the button:
    *Classic (Small) Toolbar Buttons: https://addons.mozilla.org/firefox/addon/cstbb/
    It should be possible to get the needed modifications.
    You can check out this MozillaZine forum thread and ask there for advice about how to tweak the user interface.
    *http://forums.mozillazine.org/viewtopic.php?f=7&t=2057009

  • How can I make two copies of the same picture one with my watermark and one without for printing for clients?

    how can I make two copies of the same picture one with my watermark and one without for printing for clients?

    Export the photo twice, once with a watermark and once without a watermark.

  • 2 days ago i rented The Avengers, beside it took almost 7h to download, at the end it did not get fully downloaded... 20 last minutes were not there. I know is just 5 dollars, but, how can i make a claim for the amount paid?

    2 days ago i rented The Avengers, beside it took almost 7h to download, at the end it did not get fully downloaded... 20 last minutes were not there. I know is just 5 dollars, but, how can i make a claim for the amount paid?, what if I buy a movie later? i will get the same problem!!! still I do not know how the avengers ends!! please do not tell me haha, focus on the problem here!

    Welcome to the Apple Community.
    Apple's policy on sales of digital content is that all sales are final. If however you wish to appeal to Apple, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.
    Currently, if your purchase happens to be your most recent purchase you will not be redirected to the report form, in this case use the report a problem option from the invoice that was emailed to you.
    I believe your issues are probably a network issue, which unless you resolve are likely to be repeated again.

  • How I can make an account for the app store Spain without credit card?

    How I can make an account for the app store Spain without credit card?

    Follow these instructions and open an iTunes account. Then use that same account to get free apps from the Mac App Store.
    Create an iTunes App Store account without a credit card
    http://support.apple.com/kb/ht2534

  • How can I make different catalogs from the same image

    How can I make different catalogs from the same image where that image has been changed in some way between the catalogs. For instance if I wanted to have a catalogs for cropped images and have 3 catalogs one for 4x6 , 5x7 and 8x10 cropping. When I tried this , if I changed a file in one catalog that same image in the other would change also.

    Do not confuse the creation of the crops and the display in collections per crop ratio.
    Of course one virtual copy (VC) per crop ratio is needed. If the same image should be cropped in all 3 mentioned ratios there would be 3 VCs.
    The OP asked how to have/see a set of same-crop-ratios.
    After having created the virtual copies for whatever crop ratio he wants, the way to display this result in the fashion asked for is via smart collections, provided they can be found. Without a plugin the naming of the VC with the crop ratio applied is a straight way to achieve that.
    IF the wish is to get new crops automatically added. (See my answers 2+3)
    IF the wish is to creat static collections per crop ratio for a certain set of images, I'd go as follows:
    1. Select all images you want to have cropped in that way,.
    2. With this selection click on the + to add another collection and fill the dialog box like this:
    Then navigate into this newly created selection and perform the 4x6 crop - according to taste individually or by synchronizing the first crop.
    Cornelia

  • How to create multi garnishment order for the same garnishment document

    Hi,
    Can anyone tell me how to create multi garnishment order for the same garnishment document. I tried to copy the entry in IT0195 but the sequence field is grayed out so it will just delete the old record. What configuration should I do to make this possible?
    Thanks a lot in advance.

    hi,
    As far as I got it.
    You cannot have multiple Garnishment order but if a need arises you have to maintain it in IT216.
    For that follow this path goto PA30->pernr->194->change->Garnishment->adjustment.
    Since like order you cannot maintain adjustment also directly.
    Regards,
    Amit
    Reward all helpful replies.

  • How to create  an alternative bom for the same product

    Hi expert,
       I want to know how to create an alternative bom for the same product. Can i use the different bom usage to create or use the same bom usage? In addition, how can i use the production version to link the alternative bom for the same product?
    Please help me solve the problem.
    Thanks in advance for any assistance.
    George shi

    HI
    you can go with t-code CS01
    if you have the BOM already and you want to create the alternative BOM then just goto create BOM
    and enter the material and plant and uasge system will auto matically prapose the next numner ie, if you have Alt BOM1
    then next system will prappose 2.
    then you can enter the components as per you requirement
    if you go to different BOM usage then sytem will not go for alternative BOM it gives again alt bom 1.
    prodcution version you need to craet from mateial master
    each version you can go woith alternative BOMS
    Version 1 will have alt BOM1
    Version 2 can haev ALT BOM2
    -ashok

  • How do I make itunes look for my media files on the external hardrive

    I've moved as far as I can tell all my music, videos etc. to an external drive but even though I've set itunes to look for it there in edit-preferences-advanced it still won't go there. In my list everything has the exclamation next to it and when I try to "get info" it says the original can't be found and I have to "find" it. I obviously can't do that for thousands of songs. I just updated the software on both my ipod and itunes and still nothing. I also reset my ipod and it still won't pick it up. My media files are under I:\My Music\iTunes Music\iTunes Music
    Any ideas?

    As implied above, iTunes struggles if you move the content around by hand. Changing the location under Edit > Preferences > Advanced tells iTunes where to put new content, not where to look for the old stuff. That said, if you move the library files and the media at the same time, keeping the relative paths from the library to the media unchanged then iTunes usually manages to work everything out.
    If you copied the iTunes folder over already, then the steps above should sort you out. If not it might be time to get your library sorted out propery.
    The path you mention, I:\My Music\iTunes Music\iTunes Music, looks like it has one too many levels and is the older name for the media folder. Ideally you want your library files at the root of the drive, e.g. I:\iTunes and the media folder inside that at I:\iTunes\iTunes Media. Again, ideally, your folder structure should look like the one on the right in this detatil copied from one of my older posts:
    If you have upgraded from version 8 (or earlier) to iTunes 9 (or later) at some point, then your media folder (everything inside the red outline) may still be called iTunes Music instead of iTunes Media. The extra Music folder inside the media folder is used if you have allowed iTunes to Upgrade to iTunes Media Organization (iTunes 9) or used File > Library > Organize Library > Reorganize files in the folder "<Media Folder>" (iTunes 10). Depending on your choices for Keep iTunes Media folder organized and Copy files to iTunes Media folder when adding to library plus a little bug in which one build changed the name of the file storing the choice of layout it is quite easy for some of your files to be organized according to one layout and some the other.
    If everything is set out like that then iTunes should be able to find things by itself, but if it needs a hand my script FindTracks should be able to relink any files that iTunes can't locate.
    tt2

  • How to set up 2 agreements for the same From,To,DocType,Version in B2B11g

    Hi
    I am having an issue in configuring more than one agreement for the same DocType, Version, From and To partner in Oracle B2B11g.
    When I click "Valid" button on the second agreement it errors out saying duplicate agreement is found for the same DocType, Version, From and TO partners.
    Is there any mechanism to over ride this?
    We need to have multiple agreements created for the same To Partner, From Partner, Doc Type and Version. Otherwise we will end up creating multiple partners which is a real pain.
    Multiple agreements are required because we have to set up different Interchange and Group IDs for each transaction.
    -Sriharish.
    Edited by: 840696 on Mar 1, 2011 7:30 AM

    You can not have two agreements for same From TP,To TP,DocType & DocType revision combination in B2B 11g.
    Multiple agreements are required because we have to set up different Interchange and Group IDs for each transactionIs this requirement for outbound or inbound? You may send Internal Properties from back-end to override envelope parameters in Oracle B2B in case of outbound -
    B2B 11G Outbound EDI Envelope Override
    http://www.b2bgurus.com/2008/09/internal-properties-in-oracle-b2b.html (this blog is for 10g, so read concept only, not settings)
    In case of Inbound, TP identification can be done on the basis of exchange, interchage, group. So if any of this can be same then you may have single agreement. Make sure to enable property "Functional Ack Internal Properties" on B2B console (Administration --> Configuration)-
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10229/bb_config.htm#CEGEADFJ
    Regards,
    Anuj

  • How to maintain two credit limits for the same customer.

    We have two lines of business for the same company code. One customer is trading in two lines of business.
    We want to maintain two credit limits for same customer. How is this possible.

    Hi,
    Credit Limits are assigned to customer master in a credit control area, so a customer can have different credit limits for the different credit control areas.
    (Please note that Credit Control Areas are normally assigned to company codes or sales area.)
    But if you are having only one credit control area, then only one credit limit can apply.
    However you can use the user exits to put any check you want for the customer. There are various user exits available for it like LVKMPTZZ,LVKMPFZ1,LVKMPFZ2 and LVKMPFZ3 in transaction SMOD
    Regards,
    Gaurav

  • The same Object Version Number for the same person id multiple times

    Hello all,
    I am currently facing an issue with HRMS tables and the object version number for employees. I am trying to write a report but due to the same object version number for the same person appearing in several row i am getting duplicate information. For example,
    person id 91 object version number 32 is on 4 rows and i have no idea why...help please guys, I'm at a lost so far 50 people are facing the same issue.

    Hi Baal666bobo,
    The person table is date-tracked, so the PK has effective start and end dates as well.
    Get the correct record with sysdate(or any particular date) and then check the OVN.
    Cheers,
    Vignesh

  • How can I make comments Editable for the users?

    Good day,
    How to give edit rights for  the user to edit his comment?
    If anyone can point me to a tutorial on how to do this or even give me a few tips, would be greatly appreciated!.
    Thanks

    I think we need a bit more information. Most importantly:
    #1 Edit comments where?
    #2 What technologies are you using? (PHP, Cold Fusion, etc)
    #3 A link to actual site would be most helpful
    Brad

  • When typing in a URL in an outgoing e-mail how do you make it clickable for the recipient

    When I send an e-mail to a friend and I use Internet Explorer I can include a URL in the body of the message that turns blue and is clickable by the recipient.ie:he easily reaches the website.
    In using Firefox I can type the same URL in,it doesn't change
    color and the recipient has to enter it in some other fashion in order to reach the website.

    It sounds like the album metadata is incorrect, or differs from song to song in iTunes.  Albums with various artists will play properly assuming all the songs are tagged with the same identical album name, as well as the track number.  For the Halo 2 Soundtrack, metadata should look like this:
    Song: <Song Title>
    Artist: <Song Artist>
    Album: Halo 2, Vol. 1 (Original Soundtrack)
    Genre: Soundtrack
    I had a similar problem with my imported Cowboy Bebop albums and the mixture of artists/album names.  Once I adjusted the metadata, all of them play in the correct order just by selecting the Album from the available list or in Coverflow.

Maybe you are looking for