001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.search.suggest;
016    
017    /**
018     * @author Michael C. Han
019     */
020    public class TermSuggester extends BaseSuggester {
021    
022            public TermSuggester(String name, String field) {
023                    super(name, field);
024            }
025    
026            public TermSuggester(String name, String field, String value) {
027                    super(name, field, value);
028            }
029    
030            @Override
031            public <T> T accept(SuggesterVisitor<T> suggesterVisitor) {
032                    return suggesterVisitor.visit(this);
033            }
034    
035            public Float getAccuracy() {
036                    return _accuracy;
037            }
038    
039            public String getAnalyzer() {
040                    return _analyzer;
041            }
042    
043            public Integer getMaxEdits() {
044                    return _maxEdits;
045            }
046    
047            public Integer getMaxInspections() {
048                    return _maxInspections;
049            }
050    
051            public Integer getMaxTermFreq() {
052                    return _maxTermFreq;
053            }
054    
055            public Integer getMinDocFreq() {
056                    return _minDocFreq;
057            }
058    
059            public Integer getMinWordLength() {
060                    return _minWordLength;
061            }
062    
063            public Integer getPrefixLength() {
064                    return _prefixLength;
065            }
066    
067            public Integer getShardSize() {
068                    return _shardSize;
069            }
070    
071            public Integer getSize() {
072                    return _size;
073            }
074    
075            public Sort getSort() {
076                    return _sort;
077            }
078    
079            public StringDistance getStringDistance() {
080                    return _stringDistance;
081            }
082    
083            public SuggestMode getSuggestMode() {
084                    return _suggestMode;
085            }
086    
087            public void setAccuracy(Float accuracy) {
088                    _accuracy = accuracy;
089            }
090    
091            public void setAnalyzer(String analyzer) {
092                    _analyzer = analyzer;
093            }
094    
095            public void setMaxEdits(Integer maxEdits) {
096                    _maxEdits = maxEdits;
097            }
098    
099            public void setMaxInspections(Integer maxInspections) {
100                    _maxInspections = maxInspections;
101            }
102    
103            public void setMaxTermFreq(Integer maxTermFreq) {
104                    _maxTermFreq = maxTermFreq;
105            }
106    
107            public void setMinDocFreq(Integer minDocFreq) {
108                    _minDocFreq = minDocFreq;
109            }
110    
111            public void setMinWordLength(Integer minWordLength) {
112                    _minWordLength = minWordLength;
113            }
114    
115            public void setPrefixLength(Integer prefixLength) {
116                    _prefixLength = prefixLength;
117            }
118    
119            public void setShardSize(Integer shardSize) {
120                    _shardSize = shardSize;
121            }
122    
123            public void setSize(Integer size) {
124                    _size = size;
125            }
126    
127            public void setSort(Sort sort) {
128                    _sort = sort;
129            }
130    
131            public void setStringDistance(StringDistance stringDistance) {
132                    _stringDistance = stringDistance;
133            }
134    
135            public void setSuggestMode(SuggestMode suggestMode) {
136                    _suggestMode = suggestMode;
137            }
138    
139            private Float _accuracy;
140            private String _analyzer;
141            private Integer _maxEdits;
142            private Integer _maxInspections;
143            private Integer _maxTermFreq;
144            private Integer _minDocFreq;
145            private Integer _minWordLength;
146            private Integer _prefixLength;
147            private Integer _shardSize;
148            private Integer _size;
149            private Sort _sort;
150            private StringDistance _stringDistance;
151            private SuggestMode _suggestMode;
152    
153    }