Bug 815197

Summary: Split the reindex task into smaller chunk
Product: [Retired] Zanata Reporter: David Mason <damason>
Component: UsabilityAssignee: David Mason <damason>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: low Docs Contact:
Priority: medium    
Version: 1.6-SNAPSHOTCC: sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 1.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.7-SNAPSHOT (20120706-0026) Doc Type: Bug Fix
Doc Text:
Cause The available search re-indexing operation always discards existing indexes and re-indexes all classes. Consequence Search re-index takes an unnecessarily long time when only a single class needs to be re-indexed. Search operations are not able to use existing indexes until the re-index operation for the appropriate class is complete, so will not return good results. Change Search re-index backing beans were updated to take a set of boolean options for each indexable class, which determine whether existing indexes for the class will be purged, whether re-index will be performed on entities of the class, and whether the index for the class will be optimized. These options are presented in a table on the "Manage Search" page under the Administration menu. Result Classes can be re-indexed separately, allowing for shorter re-index time per operation. Existing indexes can be kept during re-indexing, so searches may be able to return good results during re-index.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-11 05:11:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Mason 2012-04-23 05:53:48 UTC
Description of problem:
The available re-indexing operation reindexes all classes, which can take tens of minutes on a server with many translations. Administrators should have the option to reindex a subset of the data at a time, and to keep existing indexes for that class.


Version-Release number of selected component (if applicable):
1.6-alpha-1



How reproducible:
Always on a server with many translations

Steps to Reproduce:
1.Sign in as admin
2.Navigate to Administration -> Manage Search
3.click the reindex button
  
Actual results:
Reindexing takes a number of minutes

Comment 1 David Mason 2012-04-23 05:58:45 UTC
Reindex page now shows a table of all indexable classes, with checkboxes for each to indicate whether to:
 - purge the existing index for the class
 - reindex all entities of the class
 - optimize the index for the class

The state of these checkboxes when the reindex button is pressed determines the operations that will occur.

Progress is still shown as before. See server log for more specific information about the operations taking place during reindex.

Comment 2 David Mason 2012-04-23 06:18:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
The available search re-indexing operation always discards existing indexes and re-indexes all classes.

Consequence
Search re-index takes an unnecessarily long time when only a single class needs to be re-indexed. Search operations are not able to use existing indexes until the re-index operation for the appropriate class is complete, so will not return good results.

Change
Search re-index backing beans were updated to take a set of boolean options for each indexable class, which determine whether existing indices for the class will be purged, whether re-index will be performed on entities of the class, and whether the index for the class will be optimized. These options are presented in a table on the "Manage Search" page under the Administration menu.

Result
Classes can be re-indexed separately, allowing for shorter re-index time per operation. Existing indices can be kept during re-indexing, so searches may be able to return good results during re-index.

Comment 3 David Mason 2012-04-23 06:20:41 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -5,7 +5,7 @@
 Search re-index takes an unnecessarily long time when only a single class needs to be re-indexed. Search operations are not able to use existing indexes until the re-index operation for the appropriate class is complete, so will not return good results.
 
 Change
-Search re-index backing beans were updated to take a set of boolean options for each indexable class, which determine whether existing indices for the class will be purged, whether re-index will be performed on entities of the class, and whether the index for the class will be optimized. These options are presented in a table on the "Manage Search" page under the Administration menu.
+Search re-index backing beans were updated to take a set of boolean options for each indexable class, which determine whether existing indexes for the class will be purged, whether re-index will be performed on entities of the class, and whether the index for the class will be optimized. These options are presented in a table on the "Manage Search" page under the Administration menu.
 
 Result
-Classes can be re-indexed separately, allowing for shorter re-index time per operation. Existing indices can be kept during re-indexing, so searches may be able to return good results during re-index.+Classes can be re-indexed separately, allowing for shorter re-index time per operation. Existing indexes can be kept during re-indexing, so searches may be able to return good results during re-index.

Comment 4 Sean Flanigan 2012-07-04 03:15:18 UTC
The extra control when re-indexing is great, but indexing is slower than ever in Zanata 1.6 due to the extra indexes which were added.  We need to look at eliminating some of the new indexes, so as to save space and indexing time.

Comment 5 Ding-Yi Chen 2012-07-06 04:25:15 UTC
VERIFIED with Zanata version 1.7-SNAPSHOT (20120706-0026)