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>
sxa content-search
add a comment |
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>
sxa content-search
add a comment |
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>
sxa content-search
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
sxa content-search
asked 2 days ago
Mohamed Mosa
572
572
add a comment |
add a comment |
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.
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 theSitecore.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
add a comment |
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.
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 theSitecore.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
add a comment |
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.
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 theSitecore.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
add a comment |
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.
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.
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 theSitecore.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
add a comment |
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 theSitecore.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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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