custom index for date

Avatar

Avatar

rajeshs28932860

Avatar

rajeshs28932860

rajeshs28932860

08-03-2019

Hello

I basically want to create a custom index where in I want to run a query on entire repository ("/content" for example) and take only nodes (pages/contents) between two different dates.

Right now, its traversing the entire repository, can a custom index on date reduce, if so how can I do that ?

Thank you,

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

08-03-2019

Use Oak Utilities : Index Definition Generator  to generate appropriate index per your query

Tweak the index, if required per Jackrabbit Oak – Lucene Index 

Answers (3)

Answers (3)

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

11-03-2019

Use 'nrt' for same or otherwise manually reindex based on your use case. 
- async = ['async', 'nrt']

Try to go through the docs to understand how it works - Jackrabbit Oak – Indexing

Avatar

Avatar

rajeshs28932860

Avatar

rajeshs28932860

rajeshs28932860

11-03-2019

thanks both,

how about new contents which got created, do they automatically be added in index or a reindex is needed everytime ?

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

08-03-2019

In addition to Gaurav response - for those reading this thread and wanting to know more about Indexing - please watch this GEMS session - Best Practices for Indexing and Queries in AEM