This repository was archived by the owner on Jan 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
algoliasearch/src/offline/java/com/algolia/search/saas Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 67
67
*
68
68
* <h3>Preventive offline searches</h3>
69
69
*
70
+ * <p>This behavior is optional and disabled by default. It may be enabled by calling
71
+ * {@link #setPreventiveOfflineSearch(boolean)}.</p>
72
+
70
73
* <p>When the index is mirrored, it may launch a "preventive" request to the offline mirror for every online search
71
74
* request. <strong>This may result in the completion handler being called twice:</strong> a first time with the
72
- * offline results, and a second time with the online results. This behavior may be turned off by calling
73
- * {@link #setPreventiveOfflineSearch(boolean)}.</p>
75
+ * offline results, and a second time with the online results.</p>
74
76
*
75
77
* <p> To avoid wasting CPU when the network connection is good, the offline request is only launched after a certain
76
78
* delay. This delay can be adjusted by calling {@link #setPreventiveOfflineSearchDelay(long)}. The default is
@@ -99,7 +101,7 @@ public class MirroredIndex extends Index
99
101
* Whether to launch a preventive offline search for every online search.
100
102
* Only valid when the index is mirrored.
101
103
*/
102
- private boolean preventiveOfflineSearch = true ;
104
+ private boolean preventiveOfflineSearch = false ;
103
105
104
106
/** The delay before a preventive offline search is launched. */
105
107
private long preventiveOfflineSearchDelay = DEFAULT_PREVENTIVE_OFFLINE_SEARCH_DELAY ;
You can’t perform that action at this time.
0 commit comments