SXA Auto suggest results count











up vote
3
down vote

favorite












I'm using sitecore 9.1 with SXA 1.7, I configured the auto suggester in the solr, the suggest.count is 30 and the maximum predictive results count for the SXA search box is 30 also, but the returning results is always 5 although there is more data indexed in the solr, I tried many things like changing numbers or removing it but still the same.
Here is my configuration for the auto suggester :



<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">sxaSuggester</str>
<str name="lookupImpl">BlendedInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="contextField">_language</str>
<str name="field">suggestion_s</str>
<str name="suggestAnalyzerFieldType">text_suggester</str>
<str name="payloadField">templatedisplayname_s</str>
<str name="buildOnStartup">true</str>
<str name="buildOnCommit">false</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
<lst name="defaults">
<str name="suggest.dictionary">sxaSuggester</str>
<str name="suggest">true</str>
<str name="suggest.onlyMorePopular">true</str>
<str name="suggest.count">30</str>
<str name="suggest.collate">true</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>









share|improve this question


























    up vote
    3
    down vote

    favorite












    I'm using sitecore 9.1 with SXA 1.7, I configured the auto suggester in the solr, the suggest.count is 30 and the maximum predictive results count for the SXA search box is 30 also, but the returning results is always 5 although there is more data indexed in the solr, I tried many things like changing numbers or removing it but still the same.
    Here is my configuration for the auto suggester :



    <searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
    <str name="name">sxaSuggester</str>
    <str name="lookupImpl">BlendedInfixLookupFactory</str>
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="contextField">_language</str>
    <str name="field">suggestion_s</str>
    <str name="suggestAnalyzerFieldType">text_suggester</str>
    <str name="payloadField">templatedisplayname_s</str>
    <str name="buildOnStartup">true</str>
    <str name="buildOnCommit">false</str>
    </lst>
    </searchComponent>
    <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
    <lst name="defaults">
    <str name="suggest.dictionary">sxaSuggester</str>
    <str name="suggest">true</str>
    <str name="suggest.onlyMorePopular">true</str>
    <str name="suggest.count">30</str>
    <str name="suggest.collate">true</str>
    </lst>
    <arr name="components">
    <str>suggest</str>
    </arr>
    </requestHandler>









    share|improve this question
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I'm using sitecore 9.1 with SXA 1.7, I configured the auto suggester in the solr, the suggest.count is 30 and the maximum predictive results count for the SXA search box is 30 also, but the returning results is always 5 although there is more data indexed in the solr, I tried many things like changing numbers or removing it but still the same.
      Here is my configuration for the auto suggester :



      <searchComponent name="suggest" class="solr.SuggestComponent">
      <lst name="suggester">
      <str name="name">sxaSuggester</str>
      <str name="lookupImpl">BlendedInfixLookupFactory</str>
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="contextField">_language</str>
      <str name="field">suggestion_s</str>
      <str name="suggestAnalyzerFieldType">text_suggester</str>
      <str name="payloadField">templatedisplayname_s</str>
      <str name="buildOnStartup">true</str>
      <str name="buildOnCommit">false</str>
      </lst>
      </searchComponent>
      <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
      <lst name="defaults">
      <str name="suggest.dictionary">sxaSuggester</str>
      <str name="suggest">true</str>
      <str name="suggest.onlyMorePopular">true</str>
      <str name="suggest.count">30</str>
      <str name="suggest.collate">true</str>
      </lst>
      <arr name="components">
      <str>suggest</str>
      </arr>
      </requestHandler>









      share|improve this question













      I'm using sitecore 9.1 with SXA 1.7, I configured the auto suggester in the solr, the suggest.count is 30 and the maximum predictive results count for the SXA search box is 30 also, but the returning results is always 5 although there is more data indexed in the solr, I tried many things like changing numbers or removing it but still the same.
      Here is my configuration for the auto suggester :



      <searchComponent name="suggest" class="solr.SuggestComponent">
      <lst name="suggester">
      <str name="name">sxaSuggester</str>
      <str name="lookupImpl">BlendedInfixLookupFactory</str>
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="contextField">_language</str>
      <str name="field">suggestion_s</str>
      <str name="suggestAnalyzerFieldType">text_suggester</str>
      <str name="payloadField">templatedisplayname_s</str>
      <str name="buildOnStartup">true</str>
      <str name="buildOnCommit">false</str>
      </lst>
      </searchComponent>
      <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
      <lst name="defaults">
      <str name="suggest.dictionary">sxaSuggester</str>
      <str name="suggest">true</str>
      <str name="suggest.onlyMorePopular">true</str>
      <str name="suggest.count">30</str>
      <str name="suggest.collate">true</str>
      </lst>
      <arr name="components">
      <str>suggest</str>
      </arr>
      </requestHandler>






      sxa content-search






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      Mohamed Mosa

      572




      572






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Unfortunately, it's hardcoded to have 5 suggestions. It definitely shouldn't be done that way and I will register a task in our backlog to change it and make it configurable.



          As a workaround, you could override SolrSuggester or implement your own suggester by creating a class which implements ISuggester interface. At the end just replace SXA implementation by your one in the DI container.



          You can pass a number of suggestions like that:



          SuggestHandlerQueryOptions options = new SuggestHandlerQueryOptions
          {
          Parameters = new SuggestParameters
          {
          Count = NUMBER_OF_SUGGESTIONS
          }
          }


          Investigate Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester to have a full picture how the implementation should look like.






          share|improve this answer























          • Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
            – Mohamed Mosa
            2 days ago










          • We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
            – Dawid Rutkowski
            2 days ago










          • Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
            – Mohamed Mosa
            2 days ago












          • I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
            – Dawid Rutkowski
            yesterday











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "664"
          };
          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',
          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%2fsitecore.stackexchange.com%2fquestions%2f14946%2fsxa-auto-suggest-results-count%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








          up vote
          3
          down vote



          accepted










          Unfortunately, it's hardcoded to have 5 suggestions. It definitely shouldn't be done that way and I will register a task in our backlog to change it and make it configurable.



          As a workaround, you could override SolrSuggester or implement your own suggester by creating a class which implements ISuggester interface. At the end just replace SXA implementation by your one in the DI container.



          You can pass a number of suggestions like that:



          SuggestHandlerQueryOptions options = new SuggestHandlerQueryOptions
          {
          Parameters = new SuggestParameters
          {
          Count = NUMBER_OF_SUGGESTIONS
          }
          }


          Investigate Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester to have a full picture how the implementation should look like.






          share|improve this answer























          • Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
            – Mohamed Mosa
            2 days ago










          • We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
            – Dawid Rutkowski
            2 days ago










          • Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
            – Mohamed Mosa
            2 days ago












          • I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
            – Dawid Rutkowski
            yesterday















          up vote
          3
          down vote



          accepted










          Unfortunately, it's hardcoded to have 5 suggestions. It definitely shouldn't be done that way and I will register a task in our backlog to change it and make it configurable.



          As a workaround, you could override SolrSuggester or implement your own suggester by creating a class which implements ISuggester interface. At the end just replace SXA implementation by your one in the DI container.



          You can pass a number of suggestions like that:



          SuggestHandlerQueryOptions options = new SuggestHandlerQueryOptions
          {
          Parameters = new SuggestParameters
          {
          Count = NUMBER_OF_SUGGESTIONS
          }
          }


          Investigate Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester to have a full picture how the implementation should look like.






          share|improve this answer























          • Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
            – Mohamed Mosa
            2 days ago










          • We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
            – Dawid Rutkowski
            2 days ago










          • Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
            – Mohamed Mosa
            2 days ago












          • I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
            – Dawid Rutkowski
            yesterday













          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Unfortunately, it's hardcoded to have 5 suggestions. It definitely shouldn't be done that way and I will register a task in our backlog to change it and make it configurable.



          As a workaround, you could override SolrSuggester or implement your own suggester by creating a class which implements ISuggester interface. At the end just replace SXA implementation by your one in the DI container.



          You can pass a number of suggestions like that:



          SuggestHandlerQueryOptions options = new SuggestHandlerQueryOptions
          {
          Parameters = new SuggestParameters
          {
          Count = NUMBER_OF_SUGGESTIONS
          }
          }


          Investigate Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester to have a full picture how the implementation should look like.






          share|improve this answer














          Unfortunately, it's hardcoded to have 5 suggestions. It definitely shouldn't be done that way and I will register a task in our backlog to change it and make it configurable.



          As a workaround, you could override SolrSuggester or implement your own suggester by creating a class which implements ISuggester interface. At the end just replace SXA implementation by your one in the DI container.



          You can pass a number of suggestions like that:



          SuggestHandlerQueryOptions options = new SuggestHandlerQueryOptions
          {
          Parameters = new SuggestParameters
          {
          Count = NUMBER_OF_SUGGESTIONS
          }
          }


          Investigate Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester to have a full picture how the implementation should look like.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered 2 days ago









          Dawid Rutkowski

          3,108321




          3,108321












          • Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
            – Mohamed Mosa
            2 days ago










          • We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
            – Dawid Rutkowski
            2 days ago










          • Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
            – Mohamed Mosa
            2 days ago












          • I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
            – Dawid Rutkowski
            yesterday


















          • Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
            – Mohamed Mosa
            2 days ago










          • We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
            – Dawid Rutkowski
            2 days ago










          • Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
            – Mohamed Mosa
            2 days ago












          • I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
            – Dawid Rutkowski
            yesterday
















          Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
          – Mohamed Mosa
          2 days ago




          Thanks so much, I implemented my own suggester, but need to know where to reference it from Sitecore configuration.
          – Mohamed Mosa
          2 days ago












          We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
          – Dawid Rutkowski
          2 days ago




          We are registering it in the Sitecore.XA.Foundation.VersionSpecific.config file - section services. But what you need to do is to replace existing implementation by your own one, you can do it in the C# code (a lot of examples, just google it).
          – Dawid Rutkowski
          2 days ago












          Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
          – Mohamed Mosa
          2 days ago






          Great, I did it and it returns the count I desired, but still only 5 results are rendered, I checked the solr request and it's correct, but in the component-search-box.js, the suggestion: function (data) (which render the suggestion results)are called 5 times only. Is the count 5 is hard-coded somewhere else ?
          – Mohamed Mosa
          2 days ago














          I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
          – Dawid Rutkowski
          yesterday




          I don't think so. Ensure that you've properly replaced SXA implementation in the DI container.
          – Dawid Rutkowski
          yesterday


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f14946%2fsxa-auto-suggest-results-count%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

          QoS: MAC-Priority for clients behind a repeater

          Ивакино (Тотемский район)

          Can't locate Autom4te/ChannelDefs.pm in @INC (when it definitely is there)