Based on Sanne's identification of items currently not available in the ported IQ guide: > # Missing parts > As much as some parts in the original guide only apply to ORM, we should also > add some parts which only apply to JDG. > For example we need to state: > - When to use this functionality over other Query strategies > - That "indexing" is not merely about boosting query performance but a > requirement for this kind of query > - How index updates relate to JDG transactions To do list for this bug: 1. Query strategies: when to use each strategy compared to others. 2. Indexing advantages not only boosting performance but mandatory for the query type 3. relationship between index updates and JDG transactions
Adding information request for Sanne. Sanne, can you confirm the numbered points in the description are what was intended with your feedback? Also can you provide some information (or direct us to any available information on any of them?)
For 1, the only strategies I can find in the current IQ guide are reader strategies for I will assume Query strategy = reader strategy in the feedback. The current ToC in the book for this part is as follows (asterisk indicates proposed topic): 3.3. Reader Strategies 3.3.1. The Shared Strategy 3.3.2. The Not-shared Strategy 3.3.3. Custom Reader Strategies * 3.3.4 Reader Strategy Comparison For 2, need a bit more on this, drafting initial initial version. For 3, need info from sanne and possibly tristan for this.
For 3: # If the Cache is transactional, index updates are applied in an after-commit listener. A failure to update indexes is not failing the transaction (it's too late for that). # If the Cache is not transactional, index updates are applied as an post-event listener.
Point 2: Information added to this topic (new info indicated by >> and <<) ------- 2.3. Indexing Infinispan Query transparently indexes every persisted, updated or removed entity. For data that already exists in the database, create an initial Lucene index. After relevant properties and annotations are added, trigger an initial batch index of the books as follows. >>Indexing in Infinspan Query improves performance but is also mandatory for the query type<< Example 2.1. Using the Hibernate Session to Index Data FullTextSession fullTextSession = Search.getFullTextSession(session); fullTextSession.createIndexer().startAndWait(); Example 2.2. Using JPA to Index Data EntityManager em = entityManagerFactory.createEntityManager(); FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em); fullTextEntityManager.createIndexer().startAndWait(); A Lucene index appears at /var/lucene/indexes/example.Book after the code executes. Inspect the index using Luke (http://code.google.com/p/luke/) to view the workings of Infinispan Query. ----- Sanne can you ACK new info and also confirm whether Example 2.2 (with JPA) should be excluded altogether, or replaced with something suitable for Infinispan Query? Also, Sanne can you confirm what exactly the query type is when we say that indexing is mandatory for the "query type"?
added transactions using indexing topic to the infinispan query guide as well and brewed. All content still awaiting review from sanne.
This will be reviewed as part of a comprehensive review by sanne. Closing this bug.
This bug is approved and available at: https://access.redhat.com/site/documentation/Red_Hat_JBoss_Data_Grid/