custom index for date | Community
Skip to main content
rajeshs28932860
Level 3
Mar 8, 2019 3:35 PM UTC
Solved

custom index for date

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 8, 2019 4:27 PM UTC

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

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

4 replies

Gaurav-Behl
Level 10
Mar 11, 2019 4:21 PM UTC
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

Translate
rajeshs28932860
Level 3
Mar 11, 2019 3:40 PM UTC

thanks both,

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

Translate
smacdonald2008
Level 10
Mar 8, 2019 9:41 PM UTC

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

Translate
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 8, 2019 4:27 PM UTC

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

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

Translate