AEM Suggester Index

Avatar

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cristianb256715
Level 1

19-06-2019

Hi. I'm using AEM 6.4 and using the out of the box Suggester service like this:

for (final String suggestion : suggester.getSuggestions(session, INDEX, keyword, spellCheck)) {

[...]

suggestions.add(suggestion);

}


where INDEX is :

private static final String INDEX = "oak-cq:Page";



The suggester works great, returning what I'm expecting, with one small problem.

I want to only have suggestions from my project, not from we-retail as well.


I've tried making a custom index "lucene-suggest" and put it below my content/desiredProject. But, I don't know how to have my suggester use this index.


Any help is welcomed,

Thank you.

Replies

Avatar

Avatar
Validate 50
Level 6
cquser1
Level 6

Likes

75 likes

Total Posts

313 posts

Correct reply

15 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Give Back 50
View profile

Avatar
Validate 50
Level 6
cquser1
Level 6

Likes

75 likes

Total Posts

313 posts

Correct reply

15 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Give Back 50
View profile
cquser1
Level 6

19-06-2019

Just a thought.

Are you having we-retail content in the production environment. Guess we can exclude those pages.

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

19-06-2019

You can use Include/Exclude paths property on the index so that it is only indexing custom project related pages.Also, starting AEM instance with nosamplecontent will remove the we-retail content. Check [1] for more details

[1] Jackrabbit Oak – Lucene Index

Avatar

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cristianb256715
Level 1

19-06-2019

In production environment I will have two other projects on the same instance. I tried to simplify this by saying we-retail.

So there will be no we-retail, but there will be others.

Avatar

Avatar
Give Back 5
Employee
akashk22786878
Employee

Likes

30 likes

Total Posts

25 posts

Correct reply

4 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Employee
akashk22786878
Employee

Likes

30 likes

Total Posts

25 posts

Correct reply

4 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
akashk22786878
Employee

19-06-2019

You can use the AEM explain tool to see if your query is picking your index or not. If it is picking some OOTB index then you can compare and understand why the cost of OOTB index is less than yours.  Please refer to [1] for creating index as per your query and [2] for details on explain query tool.

[1] Oak Utilities : Index Definition Generator

[2] Operations Dashboard

Avatar

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
cristianb256715
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
cristianb256715
Level 1

19-06-2019

I may have not made myself understood.

This is not an index configuring problem, but, my problem is that I do not know how to reference the index I've created in my suggester.