Expand my Community achievements bar.

SOLVED

AEM 6.0 + Search Spellchecker

Avatar

Level 2

In CQ5.6.1 to enable the "Did you mean? " in the search component, all you had to do was to added the spellchecker line in the workspace.xml
http://docs.adobe.com/docs/en/crx/2-3/developing/searching_in_crx.html#Spell%20Checker%20(Did%20You%......)

This all well and good, but in AEM6.0 this isn't valid anymore, you have to set up SolR to do this.  Unfortunately, the documentation on that effect is extremely parse at best.  Following the instruction at
http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html

I was able to use Solr do to normal searches, using the recommended conf zip file.

I then followed SolR instructions into enabling the Spellchecker by adding

<searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <lst name="spellchecker"> <str name="classname">solr.IndexBasedSpellChecker</str> <str name="spellcheckIndexDir">./spellchecker</str> <str name="field">catch_all</str> <!-- wasn't sure here what to use --> <str name="buildOnCommit">true</str> </lst> </searchComponent>

Then, in the requestHandler /select and /query I've added the necessary nodes as well

<requestHandler....> <lst...> ... <str name="spellcheck">true</str> </lst> <arr name="last-components"> <str>spellcheck</str> </arr> </requestHandler>

Then I reindexed CQ completely. 

Normal searches shows the results, but if I search for a word with a mistake in it like  "testf" instead of test, I never get the "Did you mean test?"  
result.getSpellCheck() always returns false.

Anyone out there ever succeeded in enabling the Spellchecker in AEM 6.0 so far?
the lack of concise AEM documentation on this is really frustrating.

1 Accepted Solution

Avatar

Correct answer by
Level 9

There is one response on stackoverflow about this question, I find it difficult to enable spell check (often called as Search suggestion in AEM).

I am not sure whether following is true, from the link below.

http://stackoverflow.com/questions/24710497/enable-spell-checker-in-aem-6-0

 

Unfortunately, the current version of AEM 6.0 does not support the spellcheck feature. I learned this the hard way. From my understanding, AEM 6.0 SP2 still uses OAK 1.0.9. Spellcheck support in OAK has being added in 1.1.0

But here the information on how to at least enable SolR search in AEM 6.0 (which is still better than the normal JCR search) and you should be ready for the spellcheck support when it happens

http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html

To enable the spellcheck in SolR you can look at the SolR Spellchecker documentation

If my understanding is correct, OAK 1.1 should use the SolR spellcheck if it is there.
https://issues.apache.org/jira/browse/OAK-2175

View solution in original post

4 Replies

Avatar

Level 10

If the documentation is lacking for you to perform this task - log a support ticket please. 

Avatar

Correct answer by
Level 9

There is one response on stackoverflow about this question, I find it difficult to enable spell check (often called as Search suggestion in AEM).

I am not sure whether following is true, from the link below.

http://stackoverflow.com/questions/24710497/enable-spell-checker-in-aem-6-0

 

Unfortunately, the current version of AEM 6.0 does not support the spellcheck feature. I learned this the hard way. From my understanding, AEM 6.0 SP2 still uses OAK 1.0.9. Spellcheck support in OAK has being added in 1.1.0

But here the information on how to at least enable SolR search in AEM 6.0 (which is still better than the normal JCR search) and you should be ready for the spellcheck support when it happens

http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html

To enable the spellcheck in SolR you can look at the SolR Spellchecker documentation

If my understanding is correct, OAK 1.1 should use the SolR spellcheck if it is there.
https://issues.apache.org/jira/browse/OAK-2175

Avatar

Level 2

To be fair even though that post may confirm that it is "unsupported" this is still an issue in my opinion.  This is a feature that worked in AEM 5.6.1 out of the box, and there's no mention anywhere in AEM 6.0 that the feature was removed.  A lot of people looking to upgrade to 6.0 will simply think that the spellcheck is still there and will get a pretty nasty surprise down the road when they realize that it is not working anymore.  Even the foundation search component still has mention of the spellcheck functions.

I did open a ticket with Adobe on this, as suggested.

Avatar

Level 4

Hi Francois,

Did the ticket that you opened with got resolved; and did you get the answer of spellcheck work in AEM 6.0 ? I am trying with AEM 6.1 and spell check is not working. It would be really helpful if you could post the response of the ticket and also provide the fruitful solution by which you made spellcheck work on AEM 6.0.

 

Thanks