Is it possible to create faceted search in CT using product attributes?Create ArrayList from arrayHow do I create a Java string from the contents of a file?What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they doHow to create a generic array in Java?How can I create an executable JAR with dependencies using Maven?How do I create a file and write to it in Java?Creating a memory leak with JavaCreate Facets based on generic data model in Hibernate SearchHibernate Search - Setting Facets via a Field BridgeFaceting hibernate search results by Instant range fails

Auto-Styling QGIS vector layers symbology

MobileDevice.pkg untrusted, cannot open Xcode after OSX update

"When you Frankenstein a team together..." - Is "Frankenstein" a new verb?

How to make vehicular combat viable in a Post Apocalyptic world?

My co-worker withholds information about his systems and blames me for "bugs" which aren't my fault

What is the most life you can have at the end of your first turn with only three cards?

Do dams reduce the flow of river downstream?

Black hole as a storage device?

How Would Civilisations on Different Planes of a Cube Planet Interact?

Famous easy to understand examples of a confounding variable invalidating a study

Why there are no major political movements worried about asteroid/comet impact?

If authors leave out diacritics, should I correct them or leave it as written?

Is it okay to have an email address called "SS"?

Google Search Console is making up URLs which don't exist in my Sitemap and then complains that these pages have error

Why does it seem everything I push moves at a constant velocity?

Authentication versus Authorisation

Got an email saying my password is weak, reason for concern?

Should I take a "positive, but not enthusiastically strong" letter of recommendation?

What is it called when at university there are two subjects being held at the same time?

Is 让 more [make] than [let]?

What evidence would there be if radioactive decay changed 7,000 years ago?

Z80 CPU address lines not stable

“that” for emphasis

How do we distinguish old craters from new ones on the Moon?



Is it possible to create faceted search in CT using product attributes?


Create ArrayList from arrayHow do I create a Java string from the contents of a file?What are the possible values of the Hibernate hbm2ddl.auto configuration and what do they doHow to create a generic array in Java?How can I create an executable JAR with dependencies using Maven?How do I create a file and write to it in Java?Creating a memory leak with JavaCreate Facets based on generic data model in Hibernate SearchHibernate Search - Setting Facets via a Field BridgeFaceting hibernate search results by Instant range fails






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3

















I am able to create faceted search using variants' attributes:



.plusFacets(facets -> facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms())


But I haven't managed to perform the same if I wanted to do it using products' attributes mixed with variants' attributes.



Is it possible to perform such operation?










share|improve this question


























  • Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

    – Stefan Meissner
    Apr 1 at 13:52

















3

















I am able to create faceted search using variants' attributes:



.plusFacets(facets -> facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms())


But I haven't managed to perform the same if I wanted to do it using products' attributes mixed with variants' attributes.



Is it possible to perform such operation?










share|improve this question


























  • Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

    – Stefan Meissner
    Apr 1 at 13:52













3












3








3








I am able to create faceted search using variants' attributes:



.plusFacets(facets -> facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms())


But I haven't managed to perform the same if I wanted to do it using products' attributes mixed with variants' attributes.



Is it possible to perform such operation?










share|improve this question















I am able to create faceted search using variants' attributes:



.plusFacets(facets -> facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms())


But I haven't managed to perform the same if I wanted to do it using products' attributes mixed with variants' attributes.



Is it possible to perform such operation?







java commercetools






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 21:34









EderEder

1,51414 silver badges32 bronze badges




1,51414 silver badges32 bronze badges















  • Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

    – Stefan Meissner
    Apr 1 at 13:52

















  • Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

    – Stefan Meissner
    Apr 1 at 13:52
















Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

– Stefan Meissner
Apr 1 at 13:52





Hi @Eder, could you please elaborate more on what you are trying to do? What do you mean by products' vs. variants' attributes here?

– Stefan Meissner
Apr 1 at 13:52












1 Answer
1






active

oldest

votes


















3


















You can use a -> syntax to build more complex process. In example:



.plusFacets(facets -> 
Object variants = facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms();
Object products= searchForProducts(fecets);
return mixOf(variants, products);
).doMoreStuff();


So this whill give you a mix. You just need to implement missing methods or use similar syntax.






share|improve this answer



























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407187%2fis-it-possible-to-create-faceted-search-in-ct-using-product-attributes%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3


















    You can use a -> syntax to build more complex process. In example:



    .plusFacets(facets -> 
    Object variants = facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms();
    Object products= searchForProducts(fecets);
    return mixOf(variants, products);
    ).doMoreStuff();


    So this whill give you a mix. You just need to implement missing methods or use similar syntax.






    share|improve this answer






























      3


















      You can use a -> syntax to build more complex process. In example:



      .plusFacets(facets -> 
      Object variants = facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms();
      Object products= searchForProducts(fecets);
      return mixOf(variants, products);
      ).doMoreStuff();


      So this whill give you a mix. You just need to implement missing methods or use similar syntax.






      share|improve this answer




























        3














        3










        3









        You can use a -> syntax to build more complex process. In example:



        .plusFacets(facets -> 
        Object variants = facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms();
        Object products= searchForProducts(fecets);
        return mixOf(variants, products);
        ).doMoreStuff();


        So this whill give you a mix. You just need to implement missing methods or use similar syntax.






        share|improve this answer














        You can use a -> syntax to build more complex process. In example:



        .plusFacets(facets -> 
        Object variants = facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms();
        Object products= searchForProducts(fecets);
        return mixOf(variants, products);
        ).doMoreStuff();


        So this whill give you a mix. You just need to implement missing methods or use similar syntax.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Mar 28 at 21:57









        Adam MacierzyńskiAdam Macierzyński

        2742 silver badges12 bronze badges




        2742 silver badges12 bronze badges

































            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55407187%2fis-it-possible-to-create-faceted-search-in-ct-using-product-attributes%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown









            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript