blob: 7fa3966b7d1ea41d585068b9b039f6a1a0ce768e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.querytransform;
import java.util.Collection;
import com.yahoo.prelude.IndexFacts;
import com.yahoo.prelude.query.WordItem;
/**
* Transform all terms in the incoming query tree and highlight terms to lower
* case. This searcher is a compatibility layer for customers needing to use
* FSAs created for pre-5.1 systems.
*
* <p>
* Add this searcher to your search chain before any searcher running
* case-dependent automata with only lowercased contents, query transformers
* assuming lowercased input etc. Refer to the Vespa documentation on search
* chains and search chain ordering.
* </p>
*
* @since 5.1.3.
* @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
*/
public class AllLowercasingSearcher extends LowercasingSearcher {
@Override
public boolean shouldLowercase(WordItem word, IndexFacts.Session settings) {
return true;
}
}
|