내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Property Index or Lucene Index ?

Avatar

Level 4

I want to add oak index for my query and I wanted to know which would be a better option to use ? Lucene or property index? We have the property and its value to be queried upon.

Will it have an impact on the performance if I go with property index?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 3

The Property Index is useful whenever there is a query with a property constraint that is not full-text, i.e exact match. So if you want to index properties whose values are numbers, timestamp or any other specific data then go with Property Index. On the other hand, Lucene Index is for full text constraints(Title, Description and other custom properties with huge text). Lucene index is async, where the sync happens every 5 seconds and Property Index syncs every 10 seconds (This sync period can be changed in OSGi configurations)

 

If you have the query handy then you can generate the index definition using a Oak Utility

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Level 3

The Property Index is useful whenever there is a query with a property constraint that is not full-text, i.e exact match. So if you want to index properties whose values are numbers, timestamp or any other specific data then go with Property Index. On the other hand, Lucene Index is for full text constraints(Title, Description and other custom properties with huge text). Lucene index is async, where the sync happens every 5 seconds and Property Index syncs every 10 seconds (This sync period can be changed in OSGi configurations)

 

If you have the query handy then you can generate the index definition using a Oak Utility

Avatar

Level 4

Thank you @harish_malineni 

Avatar

Employee Advisor

I don't think that this response is correct. The documentation for the index types can be found on the oak site: 

 

property index: https://jackrabbit.apache.org/oak/docs/query/property-index.html

lucene index: https://jackrabbit.apache.org/oak/docs/query/lucene.html

 

The huge difference is that property indexes are synchronous, but lucene indexes are async. When you work with custom indexes, you should use Lucene indexes.