Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Custom non-root lucene index

Avatar

Level 3

We're running on MongoMK SP2 + hotfix 5779.

To optimize performance we are creating custom lucene indexes on content path. So something like this:

/content/sitea/oak:index/

/content/siteb/oak:index/

We have three types of search on cq:Page: for blog posts (property blog=true), events (property event=true), tags & free text.

I thought of creating four lucene indexes per site: one fulltext, three that include the properties. Something like:

/oak:index/lucene-blog --> on type cq:Page, indexing property blog, indexing property datePublished (ordered)

/oak:index/lucene-event --> on type cq:Page, indexing property event, indexing property startDate (ordered)

/oak:index/lucene-tags --> on type cq:Page, indexing property tags, indexing property datePublished (ordered)

/oak:index/lucene-fulltext --> copied over from the base oak:index

The problem is that when I do a tag based search its using the events lucene-event index. Which doesn't have all the pages that are tagged.

What's the problem? Can I have multiple lucene indexes on the same type?

Also, would it be possible to view the index when you use MongoMK?

Many thanks,

Katrien

1 Accepted Solution

Avatar

Correct answer by
Level 10
If docs do not help, please file a ticket. (Assuming you have not done so.)

View solution in original post

7 Replies

Avatar

Correct answer by
Level 10
If docs do not help, please file a ticket. (Assuming you have not done so.)

Avatar

Level 10
A lot of our Eng team are out this week. I will get them to look at this when they get back.      

Avatar

Level 3

Also, I've noticed that other parts of the authoring environment have become slower. Sorry for not being able to specify better. But what actually happens when you use a non-root index.

E.g., when I delete the lucene-tags index, I would have expected to use the cq:Tags index (default) for any queries only containing tags. But it doesn't. It still uses the non-root lucene-events one.

Avatar

Level 10

If you have path restriction then use Non root index and documented at http://jackrabbit.apache.org/oak/docs/query/lucene.html

Type can be of lucene or solr. You can't have cq:page.  Offcource you can create 4 index for your property. Based on your query it picks right one.

You can make index on mongoMk.

Avatar

Level 3
I saw this doc already including others that explain the nonroot lucene index. But none give the information I requested above. Non explain if you can have multiple lucene indexes on the same page type or how it chooses the index. I ve used the query analyzer which is how I know its picking the wrong index. SP2 gives a lot of freedom re: index but unfortunately not a lot of documentation. Have been trying to get same information from daycare too.

Avatar

Level 3

So no-one knows the answer? No-one with suggestions on how to create multiple lucene indexes or that can tell me what I am doing looks right?