magento 2 Get Top Search TermsSearch Term WildcardFinding visitor IP for specific search queryTruncate search query textParticular search term not working in MagentoRandom Search Terms Appearing in Last 5 Search TermsFacing issue with catalogsearch_query table when using Magento searchCan You Block Search TermsSearching for SKU without special charactersStrange search termsIs there an API for retrieving information about search terms (e.g. zero-result searches, etc)?

.NET executes a SQL query and Active Monitor shows multiple rows blocking each other

Can White Castle?

Why does Linux list NVMe drives as /dev/nvme0 instead of /dev/sda?

Employer wants to use my work email account after I quit

Hot coffee brewing solutions for deep woods camping

Suggested order for Amazon Prime Doctor Who series

How is hair tissue mineral analysis performed?

What is the origin of Scooby-Doo's name?

Drawing people along with x and y axis

Why do all the teams that I have worked with always finish a sprint without completion of all the stories?

Find the C-factor of a vote

Why do some professors with PhDs leave their professorships to teach high school?

How to remove this component from PCB

How long would it take to cross the Channel in 1890's?

Array initialization optimization

Can any NP-Complete Problem be solved using at most polynomial space (but while using exponential time?)

What happens to Cessna electric flaps that are moving when power is lost?

How dangerous are set-size assumptions?

What's currently blocking the construction of the wall between Mexico and the US?

What reason would an alien civilization have for building a Dyson Sphere (or Swarm) if cheap Nuclear fusion is available?

Does this Wild Magic result affect the sorcerer or just other creatures?

Why use cross notes in sheet music for hip hop tracks?

Why did pressing the joystick button spit out keypresses?

Who are the remaining King/Queenslayers?



magento 2 Get Top Search Terms


Search Term WildcardFinding visitor IP for specific search queryTruncate search query textParticular search term not working in MagentoRandom Search Terms Appearing in Last 5 Search TermsFacing issue with catalogsearch_query table when using Magento searchCan You Block Search TermsSearching for SKU without special charactersStrange search termsIs there an API for retrieving information about search terms (e.g. zero-result searches, etc)?






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








0















Is there a way to get the 5 tops search terms like in the Dashboard as array without having to query database->table directly sorting them popularity limit 5?










share|improve this question




























    0















    Is there a way to get the 5 tops search terms like in the Dashboard as array without having to query database->table directly sorting them popularity limit 5?










    share|improve this question
























      0












      0








      0








      Is there a way to get the 5 tops search terms like in the Dashboard as array without having to query database->table directly sorting them popularity limit 5?










      share|improve this question














      Is there a way to get the 5 tops search terms like in the Dashboard as array without having to query database->table directly sorting them popularity limit 5?







      magento2.2.2 search-terms






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 13 at 14:00









      Juliano VargasJuliano Vargas

      682625




      682625




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Found a way using MagentoSearchModelResourceModelQueryCollectionFactory



          ...
          $searchCollection = $this->_queryCollectionFactory->create()
          ->setPopularQueryFilter($this->_storeManager->getStore()->getId())
          ->setPageSize(5)
          ->load()
          ->getItems();

          foreach($searchCollection as $k=>$v)
          echo $vv->getQueryText().', ';

          ...





          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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/3.0/"u003ecc by-sa 3.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%2fmagento.stackexchange.com%2fquestions%2f278268%2fmagento-2-get-top-search-terms%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









            0














            Found a way using MagentoSearchModelResourceModelQueryCollectionFactory



            ...
            $searchCollection = $this->_queryCollectionFactory->create()
            ->setPopularQueryFilter($this->_storeManager->getStore()->getId())
            ->setPageSize(5)
            ->load()
            ->getItems();

            foreach($searchCollection as $k=>$v)
            echo $vv->getQueryText().', ';

            ...





            share|improve this answer



























              0














              Found a way using MagentoSearchModelResourceModelQueryCollectionFactory



              ...
              $searchCollection = $this->_queryCollectionFactory->create()
              ->setPopularQueryFilter($this->_storeManager->getStore()->getId())
              ->setPageSize(5)
              ->load()
              ->getItems();

              foreach($searchCollection as $k=>$v)
              echo $vv->getQueryText().', ';

              ...





              share|improve this answer

























                0












                0








                0







                Found a way using MagentoSearchModelResourceModelQueryCollectionFactory



                ...
                $searchCollection = $this->_queryCollectionFactory->create()
                ->setPopularQueryFilter($this->_storeManager->getStore()->getId())
                ->setPageSize(5)
                ->load()
                ->getItems();

                foreach($searchCollection as $k=>$v)
                echo $vv->getQueryText().', ';

                ...





                share|improve this answer













                Found a way using MagentoSearchModelResourceModelQueryCollectionFactory



                ...
                $searchCollection = $this->_queryCollectionFactory->create()
                ->setPopularQueryFilter($this->_storeManager->getStore()->getId())
                ->setPageSize(5)
                ->load()
                ->getItems();

                foreach($searchCollection as $k=>$v)
                echo $vv->getQueryText().', ';

                ...






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 13 at 16:23









                Juliano VargasJuliano Vargas

                682625




                682625



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • 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%2fmagento.stackexchange.com%2fquestions%2f278268%2fmagento-2-get-top-search-terms%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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form