8
8
9
9
public class TagField extends SchemaField {
10
10
11
- private boolean sortable ;
12
- private boolean sortableUNF ;
13
- private boolean noIndex ;
11
+ private boolean indexMissing ;
12
+ private boolean indexEmpty ;
14
13
private byte [] separator ;
15
14
private boolean caseSensitive ;
16
15
private boolean withSuffixTrie ;
16
+ private boolean sortable ;
17
+ private boolean sortableUNF ;
18
+ private boolean noIndex ;
17
19
18
20
public TagField (String fieldName ) {
19
21
super (fieldName );
@@ -37,39 +39,19 @@ public TagField as(String attribute) {
37
39
return this ;
38
40
}
39
41
40
- /**
41
- * Sorts the results by the value of this field.
42
- */
43
- public TagField sortable () {
44
- this .sortable = true ;
45
- return this ;
46
- }
47
-
48
- /**
49
- * Sorts the results by the value of this field without normalization.
50
- */
51
- public TagField sortableUNF () {
52
- this .sortableUNF = true ;
42
+ public TagField indexMissing () {
43
+ this .indexMissing = true ;
53
44
return this ;
54
45
}
55
46
56
- /**
57
- * @see TextField#sortableUNF()
58
- */
59
- public TagField sortableUnNormalizedForm () {
60
- return sortableUNF ();
61
- }
62
-
63
- /**
64
- * Avoid indexing.
65
- */
66
- public TagField noIndex () {
67
- this .noIndex = true ;
47
+ public TagField indexEmpty () {
48
+ this .indexEmpty = true ;
68
49
return this ;
69
50
}
70
51
71
52
/**
72
53
* Indicates how the text contained in the attribute is to be split into individual tags.
54
+ * @param separator
73
55
*/
74
56
public TagField separator (char separator ) {
75
57
if (separator < 128 ) {
@@ -97,11 +79,51 @@ public TagField withSuffixTrie() {
97
79
return this ;
98
80
}
99
81
82
+ /**
83
+ * Sorts the results by the value of this field.
84
+ */
85
+ public TagField sortable () {
86
+ this .sortable = true ;
87
+ return this ;
88
+ }
89
+
90
+ /**
91
+ * Sorts the results by the value of this field without normalization.
92
+ */
93
+ public TagField sortableUNF () {
94
+ this .sortableUNF = true ;
95
+ return this ;
96
+ }
97
+
98
+ /**
99
+ * @deprecated Use {@code TagField#sortableUNF()}.
100
+ * @see TagField#sortableUNF()
101
+ */
102
+ @ Deprecated
103
+ public TagField sortableUnNormalizedForm () {
104
+ return sortableUNF ();
105
+ }
106
+
107
+ /**
108
+ * Avoid indexing.
109
+ */
110
+ public TagField noIndex () {
111
+ this .noIndex = true ;
112
+ return this ;
113
+ }
114
+
100
115
@ Override
101
116
public void addParams (CommandArguments args ) {
102
117
args .addParams (fieldName );
103
118
args .add (TAG );
104
119
120
+ if (indexMissing ) {
121
+ args .add (INDEXMISSING );
122
+ }
123
+ if (indexEmpty ) {
124
+ args .add (INDEXEMPTY );
125
+ }
126
+
105
127
if (separator != null ) {
106
128
args .add (SEPARATOR ).add (separator );
107
129
}
0 commit comments