CF9 - multiple Solr collections search, remove dupes

Hello, everyone.
I'm trying to search more than one Solr collection for a keyword (let's say "Item A"), but I want to remove any duplicates and keep the ranking.
Hypothetically, let's say each collection has "Item A" in it, each ranked slightly different in their respective collection (99.9, 92.7, and 89.5).  How would I remove the two lower ranked "Item A"'s from the CFSEARCH?
Thank you,
^_^

I think I've got it.
For anyone else who has this same need, try QoQ.
<cfsearch name="cfSolrSearch" collection="collectionOne,collectionTwo,collectionThree" criteria="Item A">
<cfquery name="removeDupes" dbtype="query">
  SELECT DISTINCT title, cast(score as decimal) as score
  FROM cfSolrSearch
  ORDER BY score DESC
</cfquery>
<cfdump var="#removeDupes#">
^_^
PS.  In the first post, I mentioned "rank"; I meant "score".

Similar Messages

  • Multiple versus a single collection search with Verity

    I have a simple question about Verity search collection.
    We have been using verity for a number of years, but we have
    never done
    any real performance testing in regards to a single
    collection versus many.
    All documentation and articles argue for multiple small
    collections when
    indexing for better indexing performance. But what is the
    performance
    hit when searching 2 collections instead of 1 combined
    collection?
    How about 4 collections instead of 1?
    Thanks
    Don Vaillancourt
    Director of Software Development
    WEB IMPACT INC.
    phone: 416-815-2000 ext. 245
    fax: 416-815-2001
    toll free: 866-319-1573 ext. 245
    email: [email protected] <mailto:[email protected]>
    blackberry: [email protected]
    <mailto:[email protected]>
    web:
    http://www.web-impact.com
    address:
    http://maps.google.com
    <
    http://maps.google.com/maps?f=q&hl=en&q=99+atlantic+ave,+toronto&ie=UTF8&z=15&ll=43.640765 ,-79.420767&spn=0.013448,0.04343&om=1&iwloc=addr>
    This email message is intended only for the addressee(s) and
    contains
    information that may be confidential and/or copyright.
    If you are not the intended recipient please notify the
    sender by reply
    email and immediately delete this email.
    Use, disclosure or reproduction of this email by anyone other
    than the
    intended recipient(s) is strictly prohibited. No
    representation is made
    that this email or any attachments are free of viruses. Virus
    scanning
    is recommended and is the responsibility of the recipient.

    We are searching 7 collections with some 100.000 documents. I
    have not noticed any performance issues compared to searching only
    one collection.

  • Search option or Query to search multiple Site collections?

    Is there a Search or Portal site Hierarchy/ Structure option in SharePoint 2013 that would enable searching of specific and multiple Site collections (not Search all)?
    We opened a ticket with Microsoft o365 and they said this is not possible without custom development and that search queries can't span multiple Site collections.
    Is this true?

    You can setup a custom Result Source that limits results to the paths (URLs) provided, then use this Result Source in a custom search page, CSWP, etc. Check this post for more info:
    http://sharepointbrandon.com/2013/07/setup-multiple-search-pages-result-sources-search-scopes-for-a-site-search-in-sharepoint-2013/
    You can use the path restrictor to specify the URLs to limit the search to, IE: "path:http://yourdomain/site".
    Hope that helps.
    Brandon Atkinson
    Blog: http://sharepointbrandon.com

  • CF9 - Solr collection of database - Summaries are prepended with PK UID of record

    Hello, everyone.
    I've got a CF9 server and created a few Solr collections from within CFAdmin, then used CFINDEX to update the collection with database records.
    No matter what I do, when trying to access the Summary the data is prepended with the PK Unique ID of each record.  Is there a way to prevent this behaviour?
    Thank you,
    ^_^

    The reason I ask is because the summary is limited in character length, and the UID is a 36 character long string that is pushing 36 characters of the actual summary off the end.  I'd like to get as much of the actual summary as possible.
    Thank you,
    ^_^

  • CF9 and SOLR indexing

    We are using CF9 64-bit and setting up a SOLR collection for an HR application. The database contains several million records and includes resumes that we want to do full text searches on.
    We started out by using cfindex to create the index but it would bomb out after just a few thousand records with an error about "warming threads" (I don't have the exact error handy but can get it later) and the indexing would have to be manually restarted. This wasn't a good solution for a multi-million record operation..
    Next, we created a custom Data Import Handler (DIH) outside of CF using the instructions in the SOLR wiki. This index worked great and was very fast. However, the ColdFusion tags (cfsearch, etc.) would not work with this index. We even made sure to duplicate the required nodes (<custom1> <custom2>, etc.) that the cfindex tag would have created. Still cannot search that index.
    We'd really rather not reinvent the wheel and have to write custom search code. Obviously, we like using CF and it would be great if we can use the built-in indexing and searching capability.
    Any ideas on how we can either 1) make the <cfindex> work without stopping OR 2) go ahead and use the custom DIH and be able to make the <cfsearch> work properly?
    Dana

    I only have just over 500 records that I am trying to index, which they do consist of some large documents, and I try to loop through using the cfindex and I also get this error:
    Error_opening_new_searcher_exceeded_limit_of_maxWarmingSearchers4_try_again_later
    I found that if I put this in my loop
    <cfscript>
        thread = CreateObject("java", "java.lang.Thread");
        thread.sleep(1000);
    </cfscript>
    then I no longer have the error, but it does take a long long time to index.  I also would like a better solution.
    The coldfusion debugger shows that it is erroring out on the custom4 field.  I don't know if the custom fields are struggling more than the main body field.  Anyway, I am continuing to research my options.

  • Removing dups from list

    Hello
    i am removing dups from a list by overwriting the equals method of the class. The equals method is checking for only one attribute...but i want to have another list with different elements from the list (another attribute)
    class C has two main attributes, Color and Size. I want to have a list with different colors and another list with different sizes.
    class C equals method:
    public boolean equals(Object obj) {
         C drt = (C) obj;
         boolean bRet;
         if (drt.getColor().equals(this.getColor()) {
              bRet = true;
         else {
              bRet = false;
         return bRet;
    }adding to list A
    ListIterator li  = B.listIterator();
    while (li.hasNext())
    C celement = (C) li.next();
    if (!A.equals(celement))
       A.add(celement);
    }at this point list A consists of different (by color) celements. But what if i want to have another list to have different (by size) celements...?

    The obvious way of getting a collection of distinct things is to use a Set. However you can't have multiple "equals()" methods. There is no inbuilt "Equivalator" analogous to a Comparator.
    At the moment you are comparing a list with an element which can't be good.
    One way or another you have to compare each thing with the list so far to see if it should be added. Maybe something like:import java.util.ArrayList;
    import java.util.List;
    public class Thing {
        private String color;
        private String size;
        public Thing(String color, String size) {
            this.color = color;
            this.size = size;
        public String getColor() {
            return color;
        public String getSize() {
            return size;
        public String toString() {
            return "[" + color + "," + size + "]";
        public static void main(String[] args) {
            List<Thing> theThings = new ArrayList<Thing>();
            theThings.add(new Thing("a", "1"));
            theThings.add(new Thing("b", "1"));
            theThings.add(new Thing("a", "2"));
            theThings.add(new Thing("b", "2"));
            theThings.add(new Thing("c", "3"));
            theThings.add(new Thing("d", "1"));
            List<Thing> colorList = new ArrayList<Thing>();
            List<Thing> sizeList = new ArrayList<Thing>();
            for(Thing thing :theThings) {
                    // look for a color match
                boolean found = false;
                for(Thing test :colorList) {
                    if(test.getColor().equals(thing.getColor())) {
                        found = true;
                        break;
                if(!found) colorList.add(thing);
                    // look for a size match
                found = false;
                for(Thing test :sizeList) {
                    if(test.getSize().equals(thing.getSize())) {
                        found = true;
                        break;
                if(!found) sizeList.add(thing);
            System.out.println("Color list: " + colorList);
            System.out.println("Size list: " + sizeList);
    }

  • Solr collections disappearing

    Yesterday I created 7 solr collections. I loaded them up with data and started testing the multi-collection search against them using a webservice to access the search. I tested the searching from my local machine and was happy. This will finally resolve an issue we have had for 8 million years!!! This morning I came in and tested it again, still good. So I pushed the update to a semi-live state and allowed some traffic to it. Almost immediately I started getting "Cannot perform web service invocation search." errors. When I went to the CF administrator to see what was going on, none of the collections were listed. All the physical files still existed, but the collections were not longer registered. I restarted the Solr Service and they all came back. Again, I pushed a little traffic and they disappeared immediately.
    There are no entries in the error logs for the server doing the search nor for the server trying to serve the search.
    The server is running CF9.0 enterprise, 64-bit with 7GB of ram to the jvm.The largest collection is 554,000 documents.
    Has anyone seen this behavior before?
    Thanks,
    Scott

    for anyone else that runs into this issue, I found the solution in an article by Mark Kruger at http://www.coldfusionmuse.com/index.cfm/2010/4/4/solr-troubleshooting-coldfusion-9.
    The error was that while CF had plenty of ram in the jvm, solr only allocates 256MB by default. By updating the solr.lax configuration file to allow more ram to solr, I now have stability and a great solution to our problem!
    Scott

  • Please help me come up with a game plan to consolidate libraries and remove dupes.

    Hi all.
    I've been using Aperture since the 1.0 version.  I'm now using the latest 3.3.2 version.  I've been very sloppy in my organization and as a result I have several different libraries with dupes scattered around between all of them.  I just got a new rMBP (love it) and would like to finally get everything organized.  I have about 1TB combined of pictures (many dupes).
    I was thinking ultimately I would like to to have 1 library with just pictures from the most recent year in order to keep the library performance fast and then keep all the other pics in a seperate library that I will only access occarsionally.  So......I'm thinking I first need to combine all the libraries into 1 and then remove dupes?  Once I get everything in 1 library what would be the best way to remove them?  I've seen several apps that remove dupes but don't know if any of them work well or not.
    Would I be better off exporting all of the pics out of the aperture libraries into 1 folder and then using some software to remove them there? (I would be OK losing any adjustments if I could just get a set of masters with no dupes.  Then I could just import all of the masters into a brand new library.
    Any suggestions would be greatly appreciated.
    Thanks.

    Sorry, would love to go into fine detail about this but I'm a little tired and frustrated at this point.
    I'm basically having the same problem as robosapien. I just want to create this simple configuration :-
    AirPort Extreme Base Station (main) <--> AirPort Express (relay) <--> Airport Express (remote)
    In following various instruction manuals, common sense and logical experimentation I'm simply failing to get it to work. I've assigned MAC addresses, configured manually and with the set-up assistants but I'm begining to feel that the "multiple" configuration adjustments that happen when setting up a WDS network are somehow cancelling things out.
    Here are a few things that are confusing me.
    1) It appears I have set things up correctly in a single room environment with MAC addresses in the "right" boxes, main/relay/remote WDS settings assigned correctly and green lights on the 2 Express units. I then move Express 1 (relay) to another room and retain green light status. I then move Express 2 (remote) to it's intended location - another building, but with only 2 walls and 25ft between Express's - but I only get the flashing orange LED. I return to Express 1 and that too is flashing orange, as if Express 2 has messed up it's function when it was powered up. The network has fallen down.
    2) When experimenting with configuring each station I don't understand why a single remote base station is in a mode classed as "Create a Wireless Network" as opposed to "Join an existing Wireless Network", but that second option disables access to WDS settings, so I'll hazard a guess that is used for bridging.
    I'm sure it's probably all about the order in which you set up the base stations
    and which base station holds which MAC addresses, but I've exhausted the logical combinations.
    Any help would be greatly appreciated.
    Simon
    PowerMac G4 Dual 1.42   Mac OS X (10.4.7)  

  • IE opening multiple windows when searching google only.

    We have a problem where IE opens multiple windows when searching in Google. As a result of this we are receiving Google sorry page informing us that Google is receiving automated search requests from our public IP. Is there any quick fix to this problem
    apart from restoring and reset setting  in IE.
    Is anybody else facing this issue.?
    REgards
    Nahas

    Hi Nahas,
    Thank you for your update.
    Based on the current situation, you may remove any Google domains in your trusted sites for a test.
    Tools>Internet Options>Security tab, click "Reset all zones to default"
    Trusted sites icon, 'Sites' button. Remove any Google domains in your trusted sites list.
    For more information, you may refer to:
    Understanding Zone Elevation
    http://blogs.msdn.com/b/ieinternals/archive/2012/09/24/zone-elevation-security-warning-websites-in-less-privileged-zone-can-navigate-csrf-xss-protection.aspx
    Also, you may try to contact Google to confirm this.
    http://support.google.com/?hl=en
    If you wants to report a bug to Microsoft. I would like to share the link below with you.
    https://connect.microsoft.com/
    Thanks for your understanding.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support
    Spot on Blair. Thanks for the fix!
    Worked for me:
    Tools>Internet Options>Security tab, click "Reset all zones to default"

  • Find collective Search Help for partner function at runtime

    Hi experts,
    I have a screen very similar to VF05. When I enter the partner function, the corresponding field for the partner function, I want a collective search help to open.
    If I enter the partner function - Employee responsible, then the search help PERM has to be called or for partner function Payer, I want the search help DEBI to be called. Can anyone let me know how can I get the related partner functions, without hardcoding for every partner function. Something similar to the VF05 report.
    Warm Regards,
    Abdullah

    Hi,
    Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteriau2019s. More than one tables are Selection from multiple tables
    Steps for creating collective search help.
    1) Enter the search help name and click on create.
    2) Choose Collective search help radio button option as the search help type.
    3) Enter the search help parameters.
    Note that there is no selection method to be entered for a collective search help.
    4) Instead of the selection method, we enter the included search helps for the collective search help.
    5)We need to assign parameters for each of the included search helps.
    6) Complete the parameter assignment by clicking on the push button.
    7) Collective search help offers the user to obtain F4 help using any of the included search helps.
    Hope this helps u.
    thanks

  • Odd QoQ issue when querying Solr collection

    Hello, everyone.
    I've got a query of query issue that has me stumped.  Maybe I'm just missing something very simple, but this has got me really confuzzed.
    I have a Solr collection that is indexing a few tables in an Oracle database.  Let's call it "hdq", for this discussion.
    I wrote a semi-complex query of related tables from which the CFINDEX is using to index the data.  This is working just fine.
    I created the Solr collection in the CF9 CFAdmin, and am using the following to index with:
    <cfindex action="refresh" collection="hdq" key="QUESTION_ID" type="custom" title="QUESTION_TITLE" query="search_questions" body="QUESTION_TX,QUESTION_TITLE,CATEGORY_NM,TAG_NM,ANSWER_TITLE,ANSWER_TX"
        custom1="QUESTION_STATUS" custom2="TAG_NM" custom3="QUESTION_STATUS" custom4="QUESTION_TYPE" category="CATEGORY_NM">
    Then I do a CFSEARCH and name it "hd_questions".  Again, so far, so good, no problems.
    If I do a CFDUMP of "hd_questions", one of the columns is KEY (which is QUESTION_ID in the database.)  If I CFOUTPUT the collection, KEY is there.
    If I QoQ the CFSEARCH of the collection and use SELECT custom3, score, summary, context, key FROM hd_questions, I get an error message that
    Encountered "key. Incorrect Select List, Incorrect select column,
    .. then it gives the line number of the page that produced the error, and
    <cfquery dbtype="query" name="hd_results">
    Am I missing something simple, here?  KEY is in the collection, I can see it in CFDUMP, I can see it in CFOUTPUT.  But if I query the collection and try to select KEY, there is an error.
    Any thoughts/ideas?
    Thank you,
    ^_^

    Key is a reserved word in Coldfusion, so can't be used directly in a QoQ without escaping it.  Try wrapping it in [ ] instead, i.e. [key]
    It may also help to give it an alias too, e.g. SELECT [key] AS someKey
    See the list of reserved words here: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec173d0-7f ff.html and the QoQ guide to using reserved words here: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0e4fd -7ff0.html#WSc3ff6d0ea77859461172e0811cbec22c24-7008

  • CF9 - install Solr after-the-fact

    We have a Windows 2003 server with Multiserver configuration of ColdFusion 9 (and subsequent 9.0.1 updater) installed.  Unfortunately, we installed CF without selecting the Solr Search Server install option, and now are finding a need for it.  What are our options for getting the Solr Search Server installed on the same server? 
    Searching through Google, I found some options but not sure which is best:
    Solr Standalone Installer - seems to be for installing on a separate server, which we do not want to do.  Unclear if this would be safe to install on same server as CF 9, and also would not give ability for any updates to be automatically updated.
    Do a complete reinstall of CF 9 again on the server, but that would require extra effort and retesting of applications. 
    Install via CF 9 installation disk.  One blog I found suggested to go through the installation process again, selecting to install with ear/war as multiserver, then would be able to select option to install Solr.  We tried this on a test server, but were getting Solr errors (NullPointerException) when trying to create a new Solr collection.
    Any advice would be greatly appreciated.  I only wish Adobe had better documentation on this, as I would think it could happen more frequently.
    Thanks!
    Tiana

    Very interesting question, Tiana. But to be honest, no, it doesn’t come up that often, at least that I’ve noticed (and I’m pretty active on these and other CF troubleshooting forums and lists).
    As for solutions, I suspect you’ll find the first option below works well. As far as I know, there’s no problem at all running it on the same machine as CF. And I’d not worry as much about “updates”. It’s not often that updates seem to relate to the Solr engine (though I’ve not studied that really closely.)
    But you’re right: it really ought to be easier to enable Solr after the fact (whether for the Standard/Server or Multiserver form of deployment). I too am surprised that it’s not come up before. I’ve just done a fair bit of googling hoping to find someone having discussed it, to no avail.
    It would be a cool thing for someone to research/blog about. It may be fairly simple, just as enabling CF’s built-in web server or RDS features can be enabled after the fact, if you know what XML files to tweak. But then the Solr feature in CF runs as a service, so that has to be installed (I suspect that installer will do that), and then there are CF Admin configuration settings that need to be tweaked. I don’t use Solr enough myself to be excited to pursue this myself.
    But do consider asking Ray Camden and/or Ben Nadel, who both offer a means on their blogs to answer specific questions. I think they’d be interested in this one, in particular, since it would be a great contribution to the community to document if there’s any solution. Ray can be reached via http://www.raymondcamden.com/contact.cfm, and Ben at http://www.bennadel.com/ask-ben/ask-ben-nadel.htm.
    If you find an answer some day, please do share it here. Hope that helps.
    /charlie

  • F4 help for Elementary Search Help in collective Search help

    Hi Gurus,
    I have created an elementary search help 'ZXXX' with fields Partner , KDGRP and KTEXT .For this searh help,  I have created a  database view for the selection method with tables BUT000 , KNVV and T151.Finally, added this elemenatry search help'ZXXX' to collective searh help BUPA.
    When I press f4 on BP , I could very well see the newly created seach help 'ZXXX' in transaction BP.However, the F4 on field KDGRP is missing. I thought the SAP internally determines F4 for  KDGRP based on the check table T151 in domain KDGRP but it is not happening. I did try to infulence the values in shlp-interface and shlp-fielddescr using search help exit but it does not work.
    Could you help me how do I acheive the F4 help on field KDGRP which is used in an elementary search help and further more in collective search help BUPA on transaction BP.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    cheers,
    Amber
    Edited by: Alvaro Tejada Galindo on Jan 4, 2010 3:29 PM

    Hi
    There might be some reasons for not getting the F4 value. One reason could be the complete AUTHORISATION for shopadmin given to the user.
    Please check the SHOPADMIN authorisations of the user.
    Hope this will be helpful
    Regards

  • Adding elementry search help to SAP standard Collective Search help

    Hi,
    I had copied standard elementary search help to MAT0M to ZZ_MAT0M and added some more fields and activated to it.
    it got activated sucessfully.
    Now i have to attached the ZZ_MAT0M elementry search help to standard collective search help MAT1_A.
    How can i do that?
    can i add it directly to MAT1_A (sell --->search help <MAT1_A> changes --> in included search helpss tab using + (insert icon) )
    Thanks & regards

    I solved my problem :
    I had copied standard elementary search help to MAT0M to ZZ_MAT0M and added some more fields and copied Database View M_MAT1M to ZZ_M_MAT1M and addedd same fields and  activated both.
    both got activated sucessfully.
    Now i have to attached the ZZ_MAT0M elementry search help to standard collective search help MAT1_A and this Z-search help shd appear on the first tab.
    so I just went to collective search help MAT1_A in change mode --> click on "+" icon addedd my ZZ__ search help, save and activated it.
    If you dont really care in which tab your search help shd appear, then the best option is to use Append Search help.
    Note : if you are directly adding your search help in collective standard search help, then its better to remove hotkey form your custom elementry search help, as, if not remove will lead to warnings or make sure that you have unique hotkey in that collective search help.

  • Collective search help in SRM 7.0

    Hello all,
    Does any body has an idea why the custom elementary search helps wont get displayed in SRM7.0 When we add for a collective search help.
    For ex.. BBP_BUPA* SOURCE_OF SUPPLY is the standard collective search help where we added custom search helps to it,
    While upgrading we try to implement the same in 7.0 also, But theya re not at all visible in the  Drop down of Preferred supplier.
    I tried to check web dynpro componenet  WDR_F4_COLLECTIVE method   in debug mode  but was unable to trace it out,
    Can any body help me how can i include them to standard collective search helps  in web dynpro.
    Thanks and Regards
    geetha

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

Maybe you are looking for

  • Render Error in fcp 6 on uprez clips

    Hello all, I'm getting this error message when trying to render a clip. Wondering if there was a shorter work around than the one I'm currently using? I'm trying to render a clip that has the file name for example: frankprores1920 or as simple as "Bo

  • Itunes match plays different song

    hello, i recently bought itunes match. i succesfully uploaded over 4k songs on the cloud without a problem except one song. well, it seems uploaded first of all, but when i try to play this song from my iphone 4s, it shows every info right (name of t

  • Need you help to update business area for FI Document  generated  at migo

    HI guys I am looking for MIGO Badi or user-exit which will help update business area which is mandatory field but when movement type 101and the account assignment tab is not there when the movement type is 101 at the time of GR so i want to update it

  • How do you change the key of a Logic Pro X loop?

    Hi everyone, I am working on a song in Logic Pro X using one of the loops and I just wanted to know how to change the key of the loop to fit in with the key of the song? The key of my song is C Major while the Loop is in G Major. Any tips would be gr

  • How do I change the subtitles from portuguese to english?

    I just rented a movie from Brasil Itunes store and the subtitles came in portuguese but i want to change it to english. It says that there is cc in english but i can't enable it. Do anyone know how to do it?