deduplicator-heritrix/src/main/java/is/landsbokasafn/deduplicator/heritrix/LuceneIndexSearcher.java
/**
     * Verify that the current index supports the selected strategy. I.e. that the necessary fields are indexed.
     * @param strategy The strategy to verify
     * @throws IllegalStateException if the strategy can not be carried out for the current index
     */
Verify that the current index supports the selected strategy.
Verify that the current index supports the selected strategy .
private void verifyStrategy(SearchStrategy strategy) {
    	if (strategy==SearchStrategy.URL_EXACT || strategy==SearchStrategy.URL_CANONICAL) {
    		if (!urlIndexed) {
    			throw new IllegalStateException("URL must be indexed for search strategy " + strategy.name());
    		}
    	}
    	if (strategy==SearchStrategy.URL_CANONICAL) {
    		if (!canoncialAvailable) {
    			throw new IllegalStateException("Canonical URL must be available for search strategy " + 
    					strategy.name());
    		}
    	}
    }
private void verifyStrategy ( SearchStrategy strategy ) { if ( strategy == SearchStrategy . URL_EXACT || strategy == SearchStrategy . URL_CANONICAL ) { if ( ! urlIndexed ) { throw new IllegalStateException ( "URL must be indexed for search strategy " + strategy . name ( ) ) ; } } if ( strategy == SearchStrategy . URL_CANONICAL ) { if ( ! canoncialAvailable ) { throw new IllegalStateException ( "Canonical URL must be available for search strategy " + strategy . name ( ) ) ; } } }
Verify that the current index supports the selected strategy.
Verify that the current index supports the selected strategy .