diff --git a/builder/pom.xml b/builder/pom.xml index 81cf619b1..e31776023 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -51,5 +51,11 @@ 4.12 test + + com.stratio.cassandra + cassandra-lucene-index-plugin + ${project.version} + test + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java index f598c9690..c99de5e86 100644 --- a/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java @@ -21,7 +21,11 @@ import com.stratio.cassandra.lucene.builder.index.Partitioner; import com.stratio.cassandra.lucene.builder.index.schema.Schema; import com.stratio.cassandra.lucene.builder.index.schema.analysis.ClasspathAnalyzer; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.CustomAnalyzer; import com.stratio.cassandra.lucene.builder.index.schema.analysis.SnowballAnalyzer; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter.CharFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter.TokenFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer.Tokenizer; import com.stratio.cassandra.lucene.builder.index.schema.mapping.*; import com.stratio.cassandra.lucene.builder.search.Search; import com.stratio.cassandra.lucene.builder.search.condition.*; @@ -253,6 +257,30 @@ public static SnowballAnalyzer snowballAnalyzer(String language) { return new SnowballAnalyzer(language); } + /** + * Returns a new {@link CustomAnalyzer} using custom tokenizer, char_filters and token_filters. + * + * @param tokenizer an {@link Tokenizer} the tokenizer to use. + * @param charFilter an {@link CharFilter[]} the charFilter array to use. + * @param tokenFilter an {@link TokenFilter[]} the tokenFilter array to use. + * @return + */ + public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer, CharFilter[] charFilter, TokenFilter[] tokenFilter) { + return new CustomAnalyzer(tokenizer, charFilter, tokenFilter); + } + + public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer) { + return new CustomAnalyzer(tokenizer, null, null); + } + + public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer, CharFilter[] charFilter) { + return new CustomAnalyzer(tokenizer, charFilter, null); + } + + public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer, TokenFilter[] tokenFilter) { + return new CustomAnalyzer(tokenizer, null, tokenFilter); + } + /** * Returns a new {@link Search}. * diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/Analyzer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/Analyzer.java index 196c6ed1a..04c0ca4e7 100644 --- a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/Analyzer.java +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/Analyzer.java @@ -26,6 +26,7 @@ */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({@JsonSubTypes.Type(value = ClasspathAnalyzer.class, name = "classpath"), - @JsonSubTypes.Type(value = SnowballAnalyzer.class, name = "snowball")}) + @JsonSubTypes.Type(value = SnowballAnalyzer.class, name = "snowball"), + @JsonSubTypes.Type(value = CustomAnalyzer.class, name = "custom")}) public abstract class Analyzer extends JSONBuilder { } diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzer.java new file mode 100644 index 000000000..5e5e400ea --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzer.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter.CharFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter.TokenFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer.Tokenizer; + + +/** + * {@link Analyzer} using a Lucene's {@code Analyzer}s in classpath. + * + * It's uses the {@code Analyzer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class CustomAnalyzer extends Analyzer{ + + /** The {@code TokenFilter} array. */ + @JsonProperty("token_filter") + private final TokenFilter[] tokenFilter; + + /** The {@code CharFilter} array. */ + @JsonProperty("char_filter") + private final CharFilter[] charFilter; + + /** The {@code Tokenizer} instance. */ + @JsonProperty("tokenizer") + private final Tokenizer tokenizer; + + /** + * Builds a new {@link CustomAnalyzer} using custom tokenizer, char_filters and token_filters. + * + * @param tokenizer an {@link Tokenizer} the tokenizer to use. + * @param charFilter an {@link CharFilter[]} the charFilter array to use. + * @param tokenFilter an {@link TokenFilter[]} the tokenFilter array to use. + */ + @JsonCreator + public CustomAnalyzer(@JsonProperty("tokenizer") Tokenizer tokenizer, @JsonProperty("char_filter") CharFilter[] charFilter, + @JsonProperty("token_filter") TokenFilter[] tokenFilter) + { + this.tokenizer = tokenizer; + this.charFilter = charFilter; + this.tokenFilter = tokenFilter; + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilter.java new file mode 100644 index 000000000..65f852f0a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilter.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.stratio.cassandra.lucene.builder.JSONBuilder; + +/** + * Created by jpgilaberte on 25/05/17. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonSubTypes({@JsonSubTypes.Type(value = MappingCharFilter.class, name = "mapping"), + @JsonSubTypes.Type(value = HtmlStripCharFilter.class, name = "htmlstrip"), + @JsonSubTypes.Type(value = PatternCharFilter.class, name = "pattern"), + @JsonSubTypes.Type(value = PersianCharFilter.class, name = "persian")}) +public class CharFilter extends JSONBuilder{ + +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/HtmlStripCharFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/HtmlStripCharFilter.java new file mode 100644 index 000000000..7f0a96f92 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/HtmlStripCharFilter.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +import java.util.ArrayList; + +/** + * Created by jpgilaberte on 30/05/17. + */ +public class HtmlStripCharFilter extends CharFilter{ + + @JsonCreator + public HtmlStripCharFilter(){} + + @JsonCreator + public HtmlStripCharFilter(ArrayList escapedtags) { + this.escapedtags = escapedtags; + } + + private ArrayList escapedtags; + + public ArrayList getEscapedtags() { + return escapedtags; + } + + public HtmlStripCharFilter setEscapedtags(ArrayList escapedtags) { + this.escapedtags = escapedtags; + return this; + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/MappingCharFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/MappingCharFilter.java new file mode 100644 index 000000000..ed9be8dae --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/MappingCharFilter.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by jpgilaberte on 25/05/17. + */ +public class MappingCharFilter extends CharFilter{ + + @JsonProperty("mapping") + private final String mapping; + + @JsonCreator + public MappingCharFilter( @JsonProperty("mapping") String mapping){ + this.mapping = mapping; + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PatternCharFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PatternCharFilter.java new file mode 100644 index 000000000..f3fb4a34a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PatternCharFilter.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by jpgilaberte on 30/05/17. + */ +public class PatternCharFilter extends CharFilter{ + + @JsonProperty("pattern") + final String pattern; + + @JsonProperty("replacement") + final String replacement; + + @JsonCreator + public PatternCharFilter(@JsonProperty("pattern") String pattern, @JsonProperty("replacement") String replacement){ + this.pattern = pattern; + this.replacement = replacement; + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PersianCharFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PersianCharFilter.java new file mode 100644 index 000000000..911479679 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/PersianCharFilter.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 30/05/17. + */ +public class PersianCharFilter extends CharFilter{ + @JsonCreator + public PersianCharFilter(){} +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ApostropheTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ApostropheTokenFilter.java new file mode 100644 index 000000000..447ee6b7c --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ApostropheTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ApostropheTokenFilter extends TokenFilter{ + + @JsonCreator + public ApostropheTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicnormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicnormalizationTokenFilter.java new file mode 100644 index 000000000..3d8b6b452 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicnormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ArabicnormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public ArabicnormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicstemTokenFilter.java new file mode 100644 index 000000000..b2a0c49d7 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ArabicstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ArabicstemTokenFilter extends TokenFilter{ + + @JsonCreator + public ArabicstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/AsciifoldingTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/AsciifoldingTokenFilter.java new file mode 100644 index 000000000..77da35859 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/AsciifoldingTokenFilter.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class AsciifoldingTokenFilter extends TokenFilter{ + + @JsonCreator + public AsciifoldingTokenFilter(){} + + @JsonCreator + public AsciifoldingTokenFilter(Boolean preserveOriginal) { + this.preserveOriginal = preserveOriginal; + } + + private Boolean preserveOriginal; + + public Boolean getPreserveOriginal() { + return preserveOriginal; + } + + public AsciifoldingTokenFilter setPreserveOriginal(Boolean preserveOriginal) { + this.preserveOriginal = preserveOriginal; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BrazilianstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BrazilianstemTokenFilter.java new file mode 100644 index 000000000..d180329fd --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BrazilianstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class BrazilianstemTokenFilter extends TokenFilter{ + + @JsonCreator + public BrazilianstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BulgarianstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BulgarianstemTokenFilter.java new file mode 100644 index 000000000..346cebe81 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/BulgarianstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class BulgarianstemTokenFilter extends TokenFilter{ + + @JsonCreator + public BulgarianstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CapitalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CapitalizationTokenFilter.java new file mode 100644 index 000000000..839d0b406 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CapitalizationTokenFilter.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CapitalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public CapitalizationTokenFilter(){} + + @JsonCreator + public CapitalizationTokenFilter(Boolean onlyFirstWord, String keep, Boolean keepIgnoreCase, String okPrefix) { + this.onlyFirstWord = onlyFirstWord; + this.keep = keep; + this.keepIgnoreCase = keepIgnoreCase; + this.okPrefix = okPrefix; + } + + private Boolean onlyFirstWord; + private String keep; + private Boolean keepIgnoreCase; + private String okPrefix; + + public Boolean getOnlyFirstWord() { + return onlyFirstWord; + } + + public CapitalizationTokenFilter setOnlyFirstWord(Boolean onlyFirstWord) { + this.onlyFirstWord = onlyFirstWord; + return this; + } + + public String getKeep() { + return keep; + } + + public CapitalizationTokenFilter setKeep(String keep) { + this.keep = keep; + return this; + } + + public Boolean getKeepIgnoreCase() { + return keepIgnoreCase; + } + + public CapitalizationTokenFilter setKeepIgnoreCase(Boolean keepIgnoreCase) { + this.keepIgnoreCase = keepIgnoreCase; + return this; + } + + public String getOkPrefix() { + return okPrefix; + } + + public CapitalizationTokenFilter setOkPrefix(String okPrefix) { + this.okPrefix = okPrefix; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkbigramTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkbigramTokenFilter.java new file mode 100644 index 000000000..719ef714d --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkbigramTokenFilter.java @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CjkbigramTokenFilter extends TokenFilter{ + + @JsonCreator + public CjkbigramTokenFilter(){} + + @JsonCreator + public CjkbigramTokenFilter(Boolean han, Boolean hiragana, Boolean katakana, Boolean hangul, Boolean outputUnigrams) { + this.han = han; + this.hiragana = hiragana; + this.katakana = katakana; + this.hangul = hangul; + this.outputUnigrams = outputUnigrams; + } + + private Boolean han; + private Boolean hiragana; + private Boolean katakana; + private Boolean hangul; + private Boolean outputUnigrams; + + public Boolean getHan() { + return han; + } + + public CjkbigramTokenFilter setHan(Boolean han) { + this.han = han; + return this; + } + + public Boolean getHiragana() { + return hiragana; + } + + public CjkbigramTokenFilter setHiragana(Boolean hiragana) { + this.hiragana = hiragana; + return this; + } + + public Boolean getKatakana() { + return katakana; + } + + public CjkbigramTokenFilter setKatakana(Boolean katakana) { + this.katakana = katakana; + return this; + } + + public Boolean getHangul() { + return hangul; + } + + public CjkbigramTokenFilter setHangul(Boolean hangul) { + this.hangul = hangul; + return this; + } + + public Boolean getOutputUnigrams() { + return outputUnigrams; + } + + public CjkbigramTokenFilter setOutputUnigrams(Boolean outputUnigrams) { + this.outputUnigrams = outputUnigrams; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkwidthTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkwidthTokenFilter.java new file mode 100644 index 000000000..5f93f30a1 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CjkwidthTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CjkwidthTokenFilter extends TokenFilter{ + + @JsonCreator + public CjkwidthTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ClassicTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ClassicTokenFilter.java new file mode 100644 index 000000000..63002bfd2 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ClassicTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ClassicTokenFilter extends TokenFilter{ + + @JsonCreator + public ClassicTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CodepointcountTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CodepointcountTokenFilter.java new file mode 100644 index 000000000..4f5e28d3d --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CodepointcountTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CodepointcountTokenFilter extends TokenFilter{ + + @JsonCreator + public CodepointcountTokenFilter(){} + + @JsonCreator + public CodepointcountTokenFilter(Integer min, Integer max) { + this.min = min; + this.max = max; + } + + private Integer min = 0; + private Integer max = 1; + + public Integer getMin() { + return min; + } + + public CodepointcountTokenFilter setMin(Integer min) { + this.min = min; + return this; + } + + public Integer getMax() { + return max; + } + + public CodepointcountTokenFilter setMax(Integer max) { + this.max = max; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsTokenFilter.java new file mode 100644 index 000000000..c93d2d17c --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CommongramsTokenFilter extends TokenFilter{ + + @JsonCreator + public CommongramsTokenFilter(){} + + @JsonCreator + public CommongramsTokenFilter(String words, Boolean ignoreCase) { + this.words = words; + this.ignoreCase = ignoreCase; + } + + private String words; + private Boolean ignoreCase; + + public String getWords() { + return words; + } + + public CommongramsTokenFilter setWords(String words) { + this.words = words; + return this; + } + + public Boolean getIgnoreCase() { + return ignoreCase; + } + + public CommongramsTokenFilter setIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsqueryTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsqueryTokenFilter.java new file mode 100644 index 000000000..024fa6ad4 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CommongramsqueryTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CommongramsqueryTokenFilter extends TokenFilter{ + + @JsonCreator + public CommongramsqueryTokenFilter(){} + + @JsonCreator + public CommongramsqueryTokenFilter(String words, Boolean ignoreCase) { + this.words = words; + this.ignoreCase = ignoreCase; + } + + private String words; + private Boolean ignoreCase; + + public String getWords() { + return words; + } + + public CommongramsqueryTokenFilter setWords(String words) { + this.words = words; + return this; + } + + public Boolean getIgnoreCase() { + return ignoreCase; + } + + public CommongramsqueryTokenFilter setIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CzechstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CzechstemTokenFilter.java new file mode 100644 index 000000000..1c0b7307a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/CzechstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class CzechstemTokenFilter extends TokenFilter{ + + @JsonCreator + public CzechstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DaterecognizerTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DaterecognizerTokenFilter.java new file mode 100644 index 000000000..c8515d331 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DaterecognizerTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class DaterecognizerTokenFilter extends TokenFilter{ + + @JsonCreator + public DaterecognizerTokenFilter(){} + + @JsonCreator + public DaterecognizerTokenFilter(String datePattern, String locale) { + this.datePattern = datePattern; + this.locale = locale; + } + + private String datePattern; + private String locale; + + public String getDatePattern() { + return datePattern; + } + + public DaterecognizerTokenFilter setDatePattern(String datePattern) { + this.datePattern = datePattern; + return this; + } + + public String getLocale() { + return locale; + } + + public DaterecognizerTokenFilter setLocale(String locale) { + this.locale = locale; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DecimaldigitTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DecimaldigitTokenFilter.java new file mode 100644 index 000000000..e3bdcd620 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DecimaldigitTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class DecimaldigitTokenFilter extends TokenFilter{ + + @JsonCreator + public DecimaldigitTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DelimitedpayloadTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DelimitedpayloadTokenFilter.java new file mode 100644 index 000000000..07dfaa47b --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DelimitedpayloadTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class DelimitedpayloadTokenFilter extends TokenFilter{ + + @JsonCreator + public DelimitedpayloadTokenFilter(){} + + @JsonCreator + public DelimitedpayloadTokenFilter(String encoder, String delimiter) { + this.encoder = encoder; + this.delimiter = delimiter; + } + + private String encoder; + private String delimiter; + + public String getEncoder() { + return encoder; + } + + public DelimitedpayloadTokenFilter setEncoder(String encoder) { + this.encoder = encoder; + return this; + } + + public String getDelimiter() { + return delimiter; + } + + public DelimitedpayloadTokenFilter setDelimiter(String delimiter) { + this.delimiter = delimiter; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DictionarycompoundwordTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DictionarycompoundwordTokenFilter.java new file mode 100644 index 000000000..4cced2392 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/DictionarycompoundwordTokenFilter.java @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class DictionarycompoundwordTokenFilter extends TokenFilter{ + + @JsonCreator + public DictionarycompoundwordTokenFilter(){} + + @JsonCreator + public DictionarycompoundwordTokenFilter(String dictionary, Integer minWordSize, Integer minSubwordSize, Integer maxSubwordSize, Boolean onlyLongestMatch) { + this.dictionary = dictionary; + this.minWordSize = minWordSize; + this.minSubwordSize = minSubwordSize; + this.maxSubwordSize = maxSubwordSize; + this.onlyLongestMatch = onlyLongestMatch; + } + + private String dictionary; + private Integer minWordSize; + private Integer minSubwordSize; + private Integer maxSubwordSize; + private Boolean onlyLongestMatch; + + public String getDictionary() { + return dictionary; + } + + public DictionarycompoundwordTokenFilter setDictionary(String dictionary) { + this.dictionary = dictionary; + return this; + } + + public Integer getMinWordSize() { + return minWordSize; + } + + public DictionarycompoundwordTokenFilter setMinWordSize(Integer minWordSize) { + this.minWordSize = minWordSize; + return this; + } + + public Integer getMinSubwordSize() { + return minSubwordSize; + } + + public DictionarycompoundwordTokenFilter setMinSubwordSize(Integer minSubwordSize) { + this.minSubwordSize = minSubwordSize; + return this; + } + + public Integer getMaxSubwordSize() { + return maxSubwordSize; + } + + public DictionarycompoundwordTokenFilter setMaxSubwordSize(Integer maxSubwordSize) { + this.maxSubwordSize = maxSubwordSize; + return this; + } + + public Boolean getOnlyLongestMatch() { + return onlyLongestMatch; + } + + public DictionarycompoundwordTokenFilter setOnlyLongestMatch(Boolean onlyLongestMatch) { + this.onlyLongestMatch = onlyLongestMatch; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EdgengramTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EdgengramTokenFilter.java new file mode 100644 index 000000000..f5783eaac --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EdgengramTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class EdgengramTokenFilter extends TokenFilter{ + + @JsonCreator + public EdgengramTokenFilter(){} + + @JsonCreator + public EdgengramTokenFilter(Integer minGramSize, Integer maxGramSize) { + this.minGramSize = minGramSize; + this.maxGramSize = maxGramSize; + } + + private Integer minGramSize = 1; + private Integer maxGramSize = 2; + + public Integer getMinGramSize() { + return minGramSize; + } + + public EdgengramTokenFilter setMinGramSize(Integer minGramSize) { + this.minGramSize = minGramSize; + return this; + } + + public Integer getMaxGramSize() { + return maxGramSize; + } + + public EdgengramTokenFilter setMaxGramSize(Integer maxGramSize) { + this.maxGramSize = maxGramSize; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ElisionTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ElisionTokenFilter.java new file mode 100644 index 000000000..0aebcdd0d --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ElisionTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ElisionTokenFilter extends TokenFilter{ + + @JsonCreator + public ElisionTokenFilter(){} + + @JsonCreator + public ElisionTokenFilter(String articles, Boolean ignoreCase) { + this.articles = articles; + this.ignoreCase = ignoreCase; + } + + private String articles; + private Boolean ignoreCase; + + public String getArticles() { + return articles; + } + + public ElisionTokenFilter setArticles(String articles) { + this.articles = articles; + return this; + } + + public Boolean getIgnoreCase() { + return ignoreCase; + } + + public ElisionTokenFilter setIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishminimalstemTokenFilter.java new file mode 100644 index 000000000..dfe11ad6c --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class EnglishminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public EnglishminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishpossessiveTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishpossessiveTokenFilter.java new file mode 100644 index 000000000..fbe9fe6ed --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/EnglishpossessiveTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class EnglishpossessiveTokenFilter extends TokenFilter{ + + @JsonCreator + public EnglishpossessiveTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FingerprintTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FingerprintTokenFilter.java new file mode 100644 index 000000000..d243ac606 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FingerprintTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class FingerprintTokenFilter extends TokenFilter{ + + @JsonCreator + public FingerprintTokenFilter(){} + + @JsonCreator + public FingerprintTokenFilter(Integer maxOutputTokenSize, String separator) { + this.maxOutputTokenSize = maxOutputTokenSize; + this.separator = separator; + } + + private Integer maxOutputTokenSize = 1024; + private String separator = " "; + + public Integer getMaxOutputTokenSize() { + return maxOutputTokenSize; + } + + public FingerprintTokenFilter setMaxOutputTokenSize(Integer maxOutputTokenSize) { + this.maxOutputTokenSize = maxOutputTokenSize; + return this; + } + + public String getSeparator() { + return separator; + } + + public FingerprintTokenFilter setSeparator(String separator) { + this.separator = separator; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FinnishlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FinnishlightstemTokenFilter.java new file mode 100644 index 000000000..bdeec303b --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FinnishlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class FinnishlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public FinnishlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchlightstemTokenFilter.java new file mode 100644 index 000000000..1d439a94f --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class FrenchlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public FrenchlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchminimalstemTokenFilter.java new file mode 100644 index 000000000..871eb23ae --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/FrenchminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class FrenchminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public FrenchminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianminimalstemTokenFilter.java new file mode 100644 index 000000000..6afa1c15b --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GalicianminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GalicianminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianstemTokenFilter.java new file mode 100644 index 000000000..657916aaa --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GalicianstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GalicianstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GalicianstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanlightstemTokenFilter.java new file mode 100644 index 000000000..031135f6b --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GermanlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GermanlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanminimalstemTokenFilter.java new file mode 100644 index 000000000..974aa795e --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GermanminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GermanminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermannormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermannormalizationTokenFilter.java new file mode 100644 index 000000000..0f1c24a45 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermannormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GermannormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public GermannormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanstemTokenFilter.java new file mode 100644 index 000000000..eab7d7321 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GermanstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GermanstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GermanstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreeklowercaseTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreeklowercaseTokenFilter.java new file mode 100644 index 000000000..80fbb021e --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreeklowercaseTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GreeklowercaseTokenFilter extends TokenFilter{ + + @JsonCreator + public GreeklowercaseTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreekstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreekstemTokenFilter.java new file mode 100644 index 000000000..074cd9f38 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/GreekstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class GreekstemTokenFilter extends TokenFilter{ + + @JsonCreator + public GreekstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindinormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindinormalizationTokenFilter.java new file mode 100644 index 000000000..1b01f0d08 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindinormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HindinormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public HindinormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindistemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindistemTokenFilter.java new file mode 100644 index 000000000..bf6923d8a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HindistemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HindistemTokenFilter extends TokenFilter{ + + @JsonCreator + public HindistemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HungarianlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HungarianlightstemTokenFilter.java new file mode 100644 index 000000000..711144ed9 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HungarianlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HungarianlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public HungarianlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HunspellstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HunspellstemTokenFilter.java new file mode 100644 index 000000000..e2378f5cc --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HunspellstemTokenFilter.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HunspellstemTokenFilter extends TokenFilter{ + + @JsonCreator + public HunspellstemTokenFilter(){} + + @JsonCreator + public HunspellstemTokenFilter(String dictionary, String affix, boolean longestOnly) { + this.dictionary = dictionary; + this.affix = affix; + this.longestOnly = longestOnly; + } + + private String dictionary; + private String affix; + private boolean longestOnly; + + public String getDictionary() { + return dictionary; + } + + public HunspellstemTokenFilter setDictionary(String dictionary) { + this.dictionary = dictionary; + return this; + } + + public String getAffix() { + return affix; + } + + public HunspellstemTokenFilter setAffix(String affix) { + this.affix = affix; + return this; + } + + public boolean isLongestOnly() { + return longestOnly; + } + + public HunspellstemTokenFilter setLongestOnly(boolean longestOnly) { + this.longestOnly = longestOnly; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenatedwordsTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenatedwordsTokenFilter.java new file mode 100644 index 000000000..21af369b2 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenatedwordsTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HyphenatedwordsTokenFilter extends TokenFilter{ + + @JsonCreator + public HyphenatedwordsTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenationcompoundwordTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenationcompoundwordTokenFilter.java new file mode 100644 index 000000000..0cbee3abb --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/HyphenationcompoundwordTokenFilter.java @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class HyphenationcompoundwordTokenFilter extends TokenFilter{ + + @JsonCreator + public HyphenationcompoundwordTokenFilter(){} + + @JsonCreator + public HyphenationcompoundwordTokenFilter(String hyphenator, String encoding, String dictionary, Integer minWordSize, Integer minSubwordSize, Integer maxSubwordSize, Boolean onlyLongestMatch) { + this.hyphenator = hyphenator; + this.encoding = encoding; + this.dictionary = dictionary; + this.minWordSize = minWordSize; + this.minSubwordSize = minSubwordSize; + this.maxSubwordSize = maxSubwordSize; + this.onlyLongestMatch = onlyLongestMatch; + } + + private String hyphenator; + private String encoding; + private String dictionary; + private Integer minWordSize; + private Integer minSubwordSize; + private Integer maxSubwordSize; + private Boolean onlyLongestMatch; + + + public String getHyphenator() { + return hyphenator; + } + + public HyphenationcompoundwordTokenFilter setHyphenator(String hyphenator) { + this.hyphenator = hyphenator; + return this; + } + + public String getEncoding() { + return encoding; + } + + public HyphenationcompoundwordTokenFilter setEncoding(String encoding) { + this.encoding = encoding; + return this; + } + + public String getDictionary() { + return dictionary; + } + + public HyphenationcompoundwordTokenFilter setDictionary(String dictionary) { + this.dictionary = dictionary; + return this; + } + + public Integer getMinWordSize() { + return minWordSize; + } + + public HyphenationcompoundwordTokenFilter setMinWordSize(Integer minWordSize) { + this.minWordSize = minWordSize; + return this; + } + + public Integer getMinSubwordSize() { + return minSubwordSize; + } + + public HyphenationcompoundwordTokenFilter setMinSubwordSize(Integer minSubwordSize) { + this.minSubwordSize = minSubwordSize; + return this; + } + + public Integer getMaxSubwordSize() { + return maxSubwordSize; + } + + public HyphenationcompoundwordTokenFilter setMaxSubwordSize(Integer maxSubwordSize) { + this.maxSubwordSize = maxSubwordSize; + return this; + } + + public Boolean getOnlyLongestMatch() { + return onlyLongestMatch; + } + + public HyphenationcompoundwordTokenFilter setOnlyLongestMatch(Boolean onlyLongestMatch) { + this.onlyLongestMatch = onlyLongestMatch; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndicnormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndicnormalizationTokenFilter.java new file mode 100644 index 000000000..026a1ea86 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndicnormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class IndicnormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public IndicnormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndonesianstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndonesianstemTokenFilter.java new file mode 100644 index 000000000..01a834a90 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IndonesianstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class IndonesianstemTokenFilter extends TokenFilter{ + + @JsonCreator + public IndonesianstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IrishlowercaseTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IrishlowercaseTokenFilter.java new file mode 100644 index 000000000..f5157885a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/IrishlowercaseTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class IrishlowercaseTokenFilter extends TokenFilter{ + + @JsonCreator + public IrishlowercaseTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ItalianlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ItalianlightstemTokenFilter.java new file mode 100644 index 000000000..1f7128718 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ItalianlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ItalianlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public ItalianlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeepwordTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeepwordTokenFilter.java new file mode 100644 index 000000000..ff73d3196 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeepwordTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class KeepwordTokenFilter extends TokenFilter{ + + @JsonCreator + public KeepwordTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordmarkerTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordmarkerTokenFilter.java new file mode 100644 index 000000000..dabad5b52 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordmarkerTokenFilter.java @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class KeywordmarkerTokenFilter extends TokenFilter{ + + @JsonCreator + public KeywordmarkerTokenFilter(){} + + @JsonCreator + public KeywordmarkerTokenFilter(String protect, String pattern, Boolean ignoreCase) { + this.protect = protect; + this.pattern = pattern; + this.ignoreCase = ignoreCase; + } + + @JsonProperty("protected") + private String protect; + private String pattern; + private Boolean ignoreCase; + + public String getProtect() { + return protect; + } + + public KeywordmarkerTokenFilter setProtect(String protect) { + this.protect = protect; + return this; + } + + public String getPattern() { + return pattern; + } + + public KeywordmarkerTokenFilter setPattern(String pattern) { + this.pattern = pattern; + return this; + } + + public Boolean getIgnoreCase() { + return ignoreCase; + } + + public KeywordmarkerTokenFilter setIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordrepeatTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordrepeatTokenFilter.java new file mode 100644 index 000000000..3ec32df2e --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KeywordrepeatTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class KeywordrepeatTokenFilter extends TokenFilter{ + + @JsonCreator + public KeywordrepeatTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KstemTokenFilter.java new file mode 100644 index 000000000..d5eab988f --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/KstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class KstemTokenFilter extends TokenFilter{ + + @JsonCreator + public KstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LatvianstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LatvianstemTokenFilter.java new file mode 100644 index 000000000..33b2698a0 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LatvianstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LatvianstemTokenFilter extends TokenFilter{ + + @JsonCreator + public LatvianstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LengthTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LengthTokenFilter.java new file mode 100644 index 000000000..651c4b2bf --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LengthTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LengthTokenFilter extends TokenFilter{ + + @JsonCreator + public LengthTokenFilter(){} + + @JsonCreator + public LengthTokenFilter(Integer min, Integer max) { + this.min = min; + this.max = max; + } + + private Integer min = 0; + private Integer max; + + public Integer getMin() { + return min; + } + + public LengthTokenFilter setMin(Integer min) { + this.min = min; + return this; + } + + public Integer getMax() { + return max; + } + + public LengthTokenFilter setMax(Integer max) { + this.max = max; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokencountTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokencountTokenFilter.java new file mode 100644 index 000000000..39f26810f --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokencountTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LimittokencountTokenFilter extends TokenFilter{ + + @JsonCreator + public LimittokencountTokenFilter(){} + + @JsonCreator + public LimittokencountTokenFilter(Integer maxTokenCount, Boolean consumeAllTokens) { + this.maxTokenCount = maxTokenCount; + this.consumeAllTokens = consumeAllTokens; + } + + private Integer maxTokenCount; + private Boolean consumeAllTokens; + + public Integer getMaxTokenCount() { + return maxTokenCount; + } + + public LimittokencountTokenFilter setMaxTokenCount(Integer maxTokenCount) { + this.maxTokenCount = maxTokenCount; + return this; + } + + public Boolean getConsumeAllTokens() { + return consumeAllTokens; + } + + public LimittokencountTokenFilter setConsumeAllTokens(Boolean consumeAllTokens) { + this.consumeAllTokens = consumeAllTokens; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenoffsetTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenoffsetTokenFilter.java new file mode 100644 index 000000000..4bf2f225a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenoffsetTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LimittokenoffsetTokenFilter extends TokenFilter{ + + @JsonCreator + public LimittokenoffsetTokenFilter(){} + + @JsonCreator + public LimittokenoffsetTokenFilter(Integer maxStartOffset, Boolean consumeAllTokens) { + this.maxStartOffset = maxStartOffset; + this.consumeAllTokens = consumeAllTokens; + } + + private Integer maxStartOffset; + private Boolean consumeAllTokens; + + public Integer getMaxStartOffset() { + return maxStartOffset; + } + + public LimittokenoffsetTokenFilter setMaxStartOffset(Integer maxStartOffset) { + this.maxStartOffset = maxStartOffset; + return this; + } + + public Boolean getConsumeAllTokens() { + return consumeAllTokens; + } + + public LimittokenoffsetTokenFilter setConsumeAllTokens(Boolean consumeAllTokens) { + this.consumeAllTokens = consumeAllTokens; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenpositionTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenpositionTokenFilter.java new file mode 100644 index 000000000..c5d464c8d --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LimittokenpositionTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LimittokenpositionTokenFilter extends TokenFilter{ + + @JsonCreator + public LimittokenpositionTokenFilter(){} + + @JsonCreator + public LimittokenpositionTokenFilter(Integer maxTokenPosition, Boolean consumeAllTokens) { + this.maxTokenPosition = maxTokenPosition; + this.consumeAllTokens = consumeAllTokens; + } + + private Integer maxTokenPosition; + private Boolean consumeAllTokens; + + public Integer getMaxTokenPosition() { + return maxTokenPosition; + } + + public LimittokenpositionTokenFilter setMaxTokenPosition(Integer maxTokenPosition) { + this.maxTokenPosition = maxTokenPosition; + return this; + } + + public Boolean getConsumeAllTokens() { + return consumeAllTokens; + } + + public LimittokenpositionTokenFilter setConsumeAllTokens(Boolean consumeAllTokens) { + this.consumeAllTokens = consumeAllTokens; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LowercaseTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LowercaseTokenFilter.java new file mode 100644 index 000000000..c70987c1c --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/LowercaseTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class LowercaseTokenFilter extends TokenFilter{ + + @JsonCreator + public LowercaseTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NgramTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NgramTokenFilter.java new file mode 100644 index 000000000..2a7f056f9 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NgramTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class NgramTokenFilter extends TokenFilter{ + + @JsonCreator + public NgramTokenFilter(){} + + @JsonCreator + public NgramTokenFilter(Integer minGramSize, Integer maxGramSize) { + this.minGramSize = minGramSize; + this.maxGramSize = maxGramSize; + } + + private Integer minGramSize = 1; + private Integer maxGramSize = 2; + + public Integer getMinGramSize() { + return minGramSize; + } + + public NgramTokenFilter setMinGramSize(Integer minGramSize) { + this.minGramSize = minGramSize; + return this; + } + + public Integer getMaxGramSize() { + return maxGramSize; + } + + public NgramTokenFilter setMaxGramSize(Integer maxGramSize) { + this.maxGramSize = maxGramSize; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianlightstemTokenFilter.java new file mode 100644 index 000000000..871f6aff5 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianlightstemTokenFilter.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class NorwegianlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public NorwegianlightstemTokenFilter(){} + + @JsonCreator + public NorwegianlightstemTokenFilter(String variant) { + this.variant = variant; + } + + private String variant = "nb"; + + public String getVariant() { + return variant; + } + + public NorwegianlightstemTokenFilter setVariant(String variant) { + this.variant = variant; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianminimalstemTokenFilter.java new file mode 100644 index 000000000..4391a9ed9 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NorwegianminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class NorwegianminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public NorwegianminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NumericpayloadTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NumericpayloadTokenFilter.java new file mode 100644 index 000000000..ea8633492 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/NumericpayloadTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class NumericpayloadTokenFilter extends TokenFilter{ + + @JsonCreator + public NumericpayloadTokenFilter(){} + + @JsonCreator + public NumericpayloadTokenFilter(Integer payload, String typeMatch) { + this.payload = payload; + this.typeMatch = typeMatch; + } + + private Integer payload; + private String typeMatch; + + public Integer getPayload() { + return payload; + } + + public NumericpayloadTokenFilter setPayload(Integer payload) { + this.payload = payload; + return this; + } + + public String getTypeMatch() { + return typeMatch; + } + + public NumericpayloadTokenFilter setTypeMatch(String typeMatch) { + this.typeMatch = typeMatch; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatterncapturegroupTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatterncapturegroupTokenFilter.java new file mode 100644 index 000000000..dda3376db --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatterncapturegroupTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PatterncapturegroupTokenFilter extends TokenFilter{ + + @JsonCreator + public PatterncapturegroupTokenFilter(){} + + @JsonCreator + public PatterncapturegroupTokenFilter(String pattern, boolean preserve_original) { + this.pattern = pattern; + this.preserve_original = preserve_original; + } + + private String pattern; + private boolean preserve_original; + + public String getPattern() { + return pattern; + } + + public PatterncapturegroupTokenFilter setPattern(String pattern) { + this.pattern = pattern; + return this; + } + + public boolean isPreserve_original() { + return preserve_original; + } + + public PatterncapturegroupTokenFilter setPreserve_original(boolean preserve_original) { + this.preserve_original = preserve_original; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatternreplaceTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatternreplaceTokenFilter.java new file mode 100644 index 000000000..b8e755761 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PatternreplaceTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PatternreplaceTokenFilter extends TokenFilter{ + + @JsonCreator + public PatternreplaceTokenFilter(){} + + @JsonCreator + public PatternreplaceTokenFilter(String pattern, String replacement) { + this.pattern = pattern; + this.replacement = replacement; + } + + private String pattern; + private String replacement; + + public String getPattern() { + return pattern; + } + + public PatternreplaceTokenFilter setPattern(String pattern) { + this.pattern = pattern; + return this; + } + + public String getReplacement() { + return replacement; + } + + public PatternreplaceTokenFilter setReplacement(String replacement) { + this.replacement = replacement; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PersiannormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PersiannormalizationTokenFilter.java new file mode 100644 index 000000000..49764f6d9 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PersiannormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PersiannormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public PersiannormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PorterstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PorterstemTokenFilter.java new file mode 100644 index 000000000..759aac88c --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PorterstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PorterstemTokenFilter extends TokenFilter{ + + @JsonCreator + public PorterstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueselightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueselightstemTokenFilter.java new file mode 100644 index 000000000..03b1b92ea --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueselightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PortugueselightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public PortugueselightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueseminimalstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueseminimalstemTokenFilter.java new file mode 100644 index 000000000..d4a48d2a3 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortugueseminimalstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PortugueseminimalstemTokenFilter extends TokenFilter{ + + @JsonCreator + public PortugueseminimalstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortuguesestemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortuguesestemTokenFilter.java new file mode 100644 index 000000000..5d6616292 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/PortuguesestemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class PortuguesestemTokenFilter extends TokenFilter{ + + @JsonCreator + public PortuguesestemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RemoveduplicatesTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RemoveduplicatesTokenFilter.java new file mode 100644 index 000000000..f413369a6 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RemoveduplicatesTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class RemoveduplicatesTokenFilter extends TokenFilter{ + + @JsonCreator + public RemoveduplicatesTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ReversestringTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ReversestringTokenFilter.java new file mode 100644 index 000000000..9a7034a0a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ReversestringTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ReversestringTokenFilter extends TokenFilter{ + + @JsonCreator + public ReversestringTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RussianlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RussianlightstemTokenFilter.java new file mode 100644 index 000000000..b7143e323 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/RussianlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class RussianlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public RussianlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinavianfoldingTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinavianfoldingTokenFilter.java new file mode 100644 index 000000000..079e69750 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinavianfoldingTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ScandinavianfoldingTokenFilter extends TokenFilter{ + + @JsonCreator + public ScandinavianfoldingTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinaviannormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinaviannormalizationTokenFilter.java new file mode 100644 index 000000000..31f0b2019 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ScandinaviannormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ScandinaviannormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public ScandinaviannormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SerbiannormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SerbiannormalizationTokenFilter.java new file mode 100644 index 000000000..81ccca141 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SerbiannormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SerbiannormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public SerbiannormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ShingleTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ShingleTokenFilter.java new file mode 100644 index 000000000..99f531b8e --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ShingleTokenFilter.java @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ShingleTokenFilter extends TokenFilter{ + + @JsonCreator + public ShingleTokenFilter(){} + + @JsonCreator + public ShingleTokenFilter(Integer min_shingle_size, Integer max_shingle_size, Boolean outputUnigrams, Boolean OUIfNoShingles, String tokenSeparator, String fillerToken) { + this.min_shingle_size = min_shingle_size; + this.max_shingle_size = max_shingle_size; + this.outputUnigrams = outputUnigrams; + this.OUIfNoShingles = OUIfNoShingles; + this.tokenSeparator = tokenSeparator; + this.fillerToken = fillerToken; + } + + private Integer min_shingle_size = 2; + private Integer max_shingle_size = 2; + private Boolean outputUnigrams = false; + private Boolean OUIfNoShingles = false; + private String tokenSeparator; + private String fillerToken; + + public Integer getMin_shingle_size() { + return min_shingle_size; + } + + public ShingleTokenFilter setMin_shingle_size(Integer min_shingle_size) { + this.min_shingle_size = min_shingle_size; + return this; + } + + public Integer getMax_shingle_size() { + return max_shingle_size; + } + + public ShingleTokenFilter setMax_shingle_size(Integer max_shingle_size) { + this.max_shingle_size = max_shingle_size; + return this; + } + + public Boolean getOutputUnigrams() { + return outputUnigrams; + } + + public ShingleTokenFilter setOutputUnigrams(Boolean outputUnigrams) { + this.outputUnigrams = outputUnigrams; + return this; + } + + public Boolean getOUIfNoShingles() { + return OUIfNoShingles; + } + + public ShingleTokenFilter setOUIfNoShingles(Boolean OUIfNoShingles) { + this.OUIfNoShingles = OUIfNoShingles; + return this; + } + + public String getTokenSeparator() { + return tokenSeparator; + } + + public ShingleTokenFilter setTokenSeparator(String tokenSeparator) { + this.tokenSeparator = tokenSeparator; + return this; + } + + public String getFillerToken() { + return fillerToken; + } + + public ShingleTokenFilter setFillerToken(String fillerToken) { + this.fillerToken = fillerToken; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SnowballporterTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SnowballporterTokenFilter.java new file mode 100644 index 000000000..7629af2c5 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SnowballporterTokenFilter.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SnowballporterTokenFilter extends TokenFilter{ + + @JsonCreator + public SnowballporterTokenFilter(){} + + @JsonCreator + public SnowballporterTokenFilter(String protect, String language) { + this.protect = protect; + this.language = language; + } + + @JsonProperty("protected") + private String protect; + + private String language; + + public String getProtect() { + return protect; + } + + public SnowballporterTokenFilter setProtect(String protect) { + this.protect = protect; + return this; + } + + public String getLanguage() { + return language; + } + + public SnowballporterTokenFilter setLanguage(String language) { + this.language = language; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoraninormalizationTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoraninormalizationTokenFilter.java new file mode 100644 index 000000000..00549f6b1 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoraninormalizationTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SoraninormalizationTokenFilter extends TokenFilter{ + + @JsonCreator + public SoraninormalizationTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoranistemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoranistemTokenFilter.java new file mode 100644 index 000000000..65f8169cc --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SoranistemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SoranistemTokenFilter extends TokenFilter{ + + @JsonCreator + public SoranistemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SpanishlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SpanishlightstemTokenFilter.java new file mode 100644 index 000000000..88c963c60 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SpanishlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SpanishlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public SpanishlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StandardTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StandardTokenFilter.java new file mode 100644 index 000000000..fc1421672 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StandardTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class StandardTokenFilter extends TokenFilter{ + + @JsonCreator + public StandardTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StemmeroverrideTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StemmeroverrideTokenFilter.java new file mode 100644 index 000000000..164d2c842 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StemmeroverrideTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class StemmeroverrideTokenFilter extends TokenFilter{ + + @JsonCreator + public StemmeroverrideTokenFilter(){} + + @JsonCreator + public StemmeroverrideTokenFilter(String dictionary, Boolean ignore_case) { + this.dictionary = dictionary; + this.ignore_case = ignore_case; + } + + private String dictionary; + private Boolean ignore_case; + + public String getDictionary() { + return dictionary; + } + + public StemmeroverrideTokenFilter setDictionary(String dictionary) { + this.dictionary = dictionary; + return this; + } + + public Boolean getIgnore_case() { + return ignore_case; + } + + public StemmeroverrideTokenFilter setIgnore_case(Boolean ignore_case) { + this.ignore_case = ignore_case; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StopTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StopTokenFilter.java new file mode 100644 index 000000000..6bc8c1539 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/StopTokenFilter.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class StopTokenFilter extends TokenFilter{ + + @JsonCreator + public StopTokenFilter(){} + + @JsonCreator + public StopTokenFilter(String words, String format, Boolean ignore_case) { + this.words = words; + this.format = format; + this.ignore_case = ignore_case; + } + + private String words; + private String format; + private Boolean ignore_case; + + public String getWords() { + return words; + } + + public StopTokenFilter setWords(String words) { + this.words = words; + return this; + } + + public Boolean getIgnore_case() { + return ignore_case; + } + + public StopTokenFilter setIgnore_case(Boolean ignore_case) { + this.ignore_case = ignore_case; + return this; + } + + public String getFormat() { + return format; + } + + public StopTokenFilter setFormat(String format) { + this.format = format; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SwedishlightstemTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SwedishlightstemTokenFilter.java new file mode 100644 index 000000000..b4a995ff2 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SwedishlightstemTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SwedishlightstemTokenFilter extends TokenFilter{ + + @JsonCreator + public SwedishlightstemTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SynonymTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SynonymTokenFilter.java new file mode 100644 index 000000000..2a3bc8301 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/SynonymTokenFilter.java @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class SynonymTokenFilter extends TokenFilter{ + + @JsonCreator + public SynonymTokenFilter(){} + + @JsonCreator + public SynonymTokenFilter(String synonyms, String format, Boolean ignoreCase, Boolean expand, String tokenizerFactory) { + this.synonyms = synonyms; + this.format = format; + this.ignoreCase = ignoreCase; + this.expand = expand; + this.tokenizerFactory = tokenizerFactory; + } + + private String synonyms; + private String format; + private Boolean ignoreCase; + private Boolean expand; + private String tokenizerFactory; + + public String getSynonyms() { + return synonyms; + } + + public SynonymTokenFilter setSynonyms(String synonyms) { + this.synonyms = synonyms; + return this; + } + + public String getFormat() { + return format; + } + + public SynonymTokenFilter setFormat(String format) { + this.format = format; + return this; + } + + public Boolean getIgnoreCase() { + return ignoreCase; + } + + public SynonymTokenFilter setIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } + + public Boolean getExpand() { + return expand; + } + + public SynonymTokenFilter setExpand(Boolean expand) { + this.expand = expand; + return this; + } + + public String getTokenizerFactory() { + return tokenizerFactory; + } + + public SynonymTokenFilter setTokenizerFactory(String tokenizerFactory) { + this.tokenizerFactory = tokenizerFactory; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ThaiwordTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ThaiwordTokenFilter.java new file mode 100644 index 000000000..468de86e8 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/ThaiwordTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class ThaiwordTokenFilter extends TokenFilter{ + + @JsonCreator + public ThaiwordTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenFilter.java new file mode 100644 index 000000000..127abf9e9 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenFilter.java @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.stratio.cassandra.lucene.builder.JSONBuilder; + + +/** + * Created by jpgilaberte on 25/05/17. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonSubTypes({ + @JsonSubTypes.Type(value = ApostropheTokenFilter.class, name = "apostrophe"), + @JsonSubTypes.Type(value = ArabicnormalizationTokenFilter.class, name = "arabicnormalization"), + @JsonSubTypes.Type(value = ArabicstemTokenFilter.class, name = "arabicstem"), + @JsonSubTypes.Type(value = BulgarianstemTokenFilter.class, name = "bulgarianstem"), + @JsonSubTypes.Type(value = BrazilianstemTokenFilter.class, name = "brazilianstem"), + @JsonSubTypes.Type(value = CjkbigramTokenFilter.class, name = "cjkbigram"), + @JsonSubTypes.Type(value = CjkwidthTokenFilter.class, name = "cjkwidth"), + @JsonSubTypes.Type(value = SoraninormalizationTokenFilter.class, name = "soraninormalization"), + @JsonSubTypes.Type(value = SoranistemTokenFilter.class, name = "soranistem"), + @JsonSubTypes.Type(value = CommongramsTokenFilter.class, name = "commongrams"), + @JsonSubTypes.Type(value = CommongramsqueryTokenFilter.class, name = "commongramsquery"), + @JsonSubTypes.Type(value = DictionarycompoundwordTokenFilter.class, name = "dictionarycompoundword"), + @JsonSubTypes.Type(value = HyphenationcompoundwordTokenFilter.class, name = "hyphenationcompoundword"), + @JsonSubTypes.Type(value = DecimaldigitTokenFilter.class, name = "decimaldigit"), + @JsonSubTypes.Type(value = LowercaseTokenFilter.class, name = "lowercase"), + @JsonSubTypes.Type(value = StopTokenFilter.class, name = "stop"), + @JsonSubTypes.Type(value = TypeTokenFilter.class, name = "type"), + @JsonSubTypes.Type(value = UppercaseTokenFilter.class, name = "uppercase"), + @JsonSubTypes.Type(value = CzechstemTokenFilter.class, name = "czechstem"), + @JsonSubTypes.Type(value = GermanlightstemTokenFilter.class, name = "germanlightstem"), + @JsonSubTypes.Type(value = GermanminimalstemTokenFilter.class, name = "germanminimalstem"), + @JsonSubTypes.Type(value = GermannormalizationTokenFilter.class, name = "germannormalization"), + @JsonSubTypes.Type(value = GermanstemTokenFilter.class, name = "germanstem"), + @JsonSubTypes.Type(value = GreeklowercaseTokenFilter.class, name = "greeklowercase"), + @JsonSubTypes.Type(value = GreekstemTokenFilter.class, name = "greekstem"), + @JsonSubTypes.Type(value = EnglishminimalstemTokenFilter.class, name = "englishminimalstem"), + @JsonSubTypes.Type(value = EnglishpossessiveTokenFilter.class, name = "englishpossessive"), + @JsonSubTypes.Type(value = KstemTokenFilter.class, name = "kstem"), + @JsonSubTypes.Type(value = PorterstemTokenFilter.class, name = "porterstem"), + @JsonSubTypes.Type(value = SpanishlightstemTokenFilter.class, name = "spanishlightstem"), + @JsonSubTypes.Type(value = PersiannormalizationTokenFilter.class, name = "persiannormalization"), + @JsonSubTypes.Type(value = FinnishlightstemTokenFilter.class, name = "finnishlightstem"), + @JsonSubTypes.Type(value = FrenchlightstemTokenFilter.class, name = "frenchlightstem"), + @JsonSubTypes.Type(value = FrenchminimalstemTokenFilter.class, name = "frenchminimalstem"), + @JsonSubTypes.Type(value = IrishlowercaseTokenFilter.class, name = "irishlowercase"), + @JsonSubTypes.Type(value = GalicianminimalstemTokenFilter.class, name = "galicianminimalstem"), + @JsonSubTypes.Type(value = GalicianstemTokenFilter.class, name = "galicianstem"), + @JsonSubTypes.Type(value = HindinormalizationTokenFilter.class, name = "hindinormalization"), + @JsonSubTypes.Type(value = HindistemTokenFilter.class, name = "hindistem"), + @JsonSubTypes.Type(value = HungarianlightstemTokenFilter.class, name = "hungarianlightstem"), + @JsonSubTypes.Type(value = HunspellstemTokenFilter.class, name = "hunspellstem"), + @JsonSubTypes.Type(value = IndonesianstemTokenFilter.class, name = "indonesianstem"), + @JsonSubTypes.Type(value = IndicnormalizationTokenFilter.class, name = "indicnormalization"), + @JsonSubTypes.Type(value = ItalianlightstemTokenFilter.class, name = "italianlightstem"), + @JsonSubTypes.Type(value = LatvianstemTokenFilter.class, name = "latvianstem"), + @JsonSubTypes.Type(value = AsciifoldingTokenFilter.class, name = "asciifolding"), + @JsonSubTypes.Type(value = CapitalizationTokenFilter.class, name = "capitalization"), + @JsonSubTypes.Type(value = CodepointcountTokenFilter.class, name = "codepointcount"), + @JsonSubTypes.Type(value = DaterecognizerTokenFilter.class, name = "daterecognizer"), + @JsonSubTypes.Type(value = FingerprintTokenFilter.class, name = "fingerprint"), + @JsonSubTypes.Type(value = HyphenatedwordsTokenFilter.class, name = "hyphenatedwords"), + @JsonSubTypes.Type(value = KeepwordTokenFilter.class, name = "keepword"), + @JsonSubTypes.Type(value = KeywordmarkerTokenFilter.class, name = "keywordmarker"), + @JsonSubTypes.Type(value = KeywordrepeatTokenFilter.class, name = "keywordrepeat"), + @JsonSubTypes.Type(value = LengthTokenFilter.class, name = "length"), + @JsonSubTypes.Type(value = LimittokencountTokenFilter.class, name = "limittokencount"), + @JsonSubTypes.Type(value = LimittokenoffsetTokenFilter.class, name = "limittokenoffset"), + @JsonSubTypes.Type(value = LimittokenpositionTokenFilter.class, name = "limittokenposition"), + @JsonSubTypes.Type(value = RemoveduplicatesTokenFilter.class, name = "removeduplicates"), + @JsonSubTypes.Type(value = StemmeroverrideTokenFilter.class, name = "stemmeroverride"), + @JsonSubTypes.Type(value = TrimTokenFilter.class, name = "trim"), + @JsonSubTypes.Type(value = TruncateTokenFilter.class, name = "truncate"), + @JsonSubTypes.Type(value = WorddelimiterTokenFilter.class, name = "worddelimiter"), + @JsonSubTypes.Type(value = ScandinavianfoldingTokenFilter.class, name = "scandinavianfolding"), + @JsonSubTypes.Type(value = ScandinaviannormalizationTokenFilter.class, name = "scandinaviannormalization"), + @JsonSubTypes.Type(value = EdgengramTokenFilter.class, name = "edgengram"), + @JsonSubTypes.Type(value = NgramTokenFilter.class, name = "ngram"), + @JsonSubTypes.Type(value = NorwegianlightstemTokenFilter.class, name = "norwegianlightstem"), + @JsonSubTypes.Type(value = NorwegianminimalstemTokenFilter.class, name = "norwegianminimalstem"), + @JsonSubTypes.Type(value = PatternreplaceTokenFilter.class, name = "patternreplace"), + @JsonSubTypes.Type(value = PatterncapturegroupTokenFilter.class, name = "patterncapturegroup"), + @JsonSubTypes.Type(value = DelimitedpayloadTokenFilter.class, name = "delimitedpayload"), + @JsonSubTypes.Type(value = NumericpayloadTokenFilter.class, name = "numericpayload"), + @JsonSubTypes.Type(value = TokenoffsetpayloadTokenFilter.class, name = "tokenoffsetpayload"), + @JsonSubTypes.Type(value = TypeaspayloadTokenFilter.class, name = "typeaspayload"), + @JsonSubTypes.Type(value = PortugueselightstemTokenFilter.class, name = "portugueselightstem"), + @JsonSubTypes.Type(value = PortugueseminimalstemTokenFilter.class, name = "portugueseminimalstem"), + @JsonSubTypes.Type(value = PortuguesestemTokenFilter.class, name = "portuguesestem"), + @JsonSubTypes.Type(value = ReversestringTokenFilter.class, name = "reversestring"), + @JsonSubTypes.Type(value = RussianlightstemTokenFilter.class, name = "russianlightstem"), + @JsonSubTypes.Type(value = ShingleTokenFilter.class, name = "shingle"), + @JsonSubTypes.Type(value = SnowballporterTokenFilter.class, name = "snowballporter"), + @JsonSubTypes.Type(value = SerbiannormalizationTokenFilter.class, name = "serbiannormalization"), + @JsonSubTypes.Type(value = ClassicTokenFilter.class, name = "classic"), + @JsonSubTypes.Type(value = StandardTokenFilter.class, name = "standard"), + @JsonSubTypes.Type(value = SwedishlightstemTokenFilter.class, name = "swedishlightstem"), + @JsonSubTypes.Type(value = SynonymTokenFilter.class, name = "synonym"), + @JsonSubTypes.Type(value = ThaiwordTokenFilter.class, name = "thaiword"), + @JsonSubTypes.Type(value = TurkishlowercaseTokenFilter.class, name = "turkishlowercase"), + @JsonSubTypes.Type(value = ElisionTokenFilter.class, name = "elision") +}) +public class TokenFilter extends JSONBuilder{ +} \ No newline at end of file diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenoffsetpayloadTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenoffsetpayloadTokenFilter.java new file mode 100644 index 000000000..fe902fabe --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TokenoffsetpayloadTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TokenoffsetpayloadTokenFilter extends TokenFilter{ + + @JsonCreator + public TokenoffsetpayloadTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TrimTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TrimTokenFilter.java new file mode 100644 index 000000000..9fbba48d2 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TrimTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TrimTokenFilter extends TokenFilter{ + + @JsonCreator + public TrimTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TruncateTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TruncateTokenFilter.java new file mode 100644 index 000000000..b6d77b8be --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TruncateTokenFilter.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TruncateTokenFilter extends TokenFilter{ + + @JsonCreator + public TruncateTokenFilter(){} + + @JsonCreator + public TruncateTokenFilter(Integer prefixLength) { + this.prefixLength = prefixLength; + } + + private Integer prefixLength; + + public Integer getPrefixLength() { + return prefixLength; + } + + public TruncateTokenFilter setPrefixLength(Integer prefixLength) { + this.prefixLength = prefixLength; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TurkishlowercaseTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TurkishlowercaseTokenFilter.java new file mode 100644 index 000000000..18551b0f0 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TurkishlowercaseTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TurkishlowercaseTokenFilter extends TokenFilter{ + + @JsonCreator + public TurkishlowercaseTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeTokenFilter.java new file mode 100644 index 000000000..b278e93bb --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeTokenFilter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TypeTokenFilter extends TokenFilter{ + + @JsonCreator + public TypeTokenFilter(){} + + @JsonCreator + public TypeTokenFilter(String types, Boolean useWhitelist) { + this.types = types; + this.useWhitelist = useWhitelist; + } + + private String types; + private Boolean useWhitelist; + + public String getTypes() { + return types; + } + + public TypeTokenFilter setTypes(String types) { + this.types = types; + return this; + } + + public Boolean getUseWhitelist() { + return useWhitelist; + } + + public TypeTokenFilter setUseWhitelist(Boolean useWhitelist) { + this.useWhitelist = useWhitelist; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeaspayloadTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeaspayloadTokenFilter.java new file mode 100644 index 000000000..3471568e4 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/TypeaspayloadTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class TypeaspayloadTokenFilter extends TokenFilter{ + + @JsonCreator + public TypeaspayloadTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/UppercaseTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/UppercaseTokenFilter.java new file mode 100644 index 000000000..44dc61e17 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/UppercaseTokenFilter.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class UppercaseTokenFilter extends TokenFilter{ + + @JsonCreator + public UppercaseTokenFilter(){} +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/WorddelimiterTokenFilter.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/WorddelimiterTokenFilter.java new file mode 100644 index 000000000..82a351db2 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenFilter/WorddelimiterTokenFilter.java @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Created by jpgilaberte on 25/05/17. + */ + public class WorddelimiterTokenFilter extends TokenFilter{ + + @JsonCreator + public WorddelimiterTokenFilter(){} + + @JsonCreator + public WorddelimiterTokenFilter(String protect, Integer preserveOriginal, Integer splitOnNumerics, Integer splitOnCaseChange, Integer catenateWords, Integer catenateNumbers, Integer catenateAll, Integer generateWordParts, Integer genNumberParts, Integer stemEnglishPosse, String types) { + this.protect = protect; + this.preserveOriginal = preserveOriginal; + this.splitOnNumerics = splitOnNumerics; + this.splitOnCaseChange = splitOnCaseChange; + this.catenateWords = catenateWords; + this.catenateNumbers = catenateNumbers; + this.catenateAll = catenateAll; + this.generateWordParts = generateWordParts; + this.genNumberParts = genNumberParts; + this.stemEnglishPosse = stemEnglishPosse; + this.types = types; + } + + @JsonProperty("protected") + private String protect; + private Integer preserveOriginal; + private Integer splitOnNumerics = 1; + private Integer splitOnCaseChange = 1; + private Integer catenateWords = 0; + private Integer catenateNumbers = 0; + private Integer catenateAll = 0; + private Integer generateWordParts = 1; + private Integer genNumberParts = 1; + private Integer stemEnglishPosse = 1; + private String types; + + public String getProtect() { + return protect; + } + + public WorddelimiterTokenFilter setProtect(String protect) { + this.protect = protect; + return this; + } + + public String getTypes() { + return types; + } + + public WorddelimiterTokenFilter setTypes(String types) { + this.types = types; + return this; + } + + public Integer getGenNumberParts() { + return genNumberParts; + } + + public WorddelimiterTokenFilter setGenNumberParts(Integer genNumberParts) { + this.genNumberParts = genNumberParts; + return this; + } + + public Integer getStemEnglishPosse() { + return stemEnglishPosse; + } + + public WorddelimiterTokenFilter setStemEnglishPosse(Integer stemEnglishPosse) { + this.stemEnglishPosse = stemEnglishPosse; + return this; + } + + public Integer getCatenateNumbers() { + return catenateNumbers; + } + + public WorddelimiterTokenFilter setCatenateNumbers(Integer catenateNumbers) { + this.catenateNumbers = catenateNumbers; + return this; + } + + public Integer getCatenateAll() { + return catenateAll; + } + + public WorddelimiterTokenFilter setCatenateAll(Integer catenateAll) { + this.catenateAll = catenateAll; + return this; + } + + public Integer getGenerateWordParts() { + return generateWordParts; + } + + public WorddelimiterTokenFilter setGenerateWordParts(Integer generateWordParts) { + this.generateWordParts = generateWordParts; + return this; + } + + public Integer getPreserveOriginal() { + return preserveOriginal; + } + + public WorddelimiterTokenFilter setPreserveOriginal(Integer preserveOriginal) { + this.preserveOriginal = preserveOriginal; + return this; + } + + public Integer getSplitOnNumerics() { + return splitOnNumerics; + } + + public WorddelimiterTokenFilter setSplitOnNumerics(Integer splitOnNumerics) { + this.splitOnNumerics = splitOnNumerics; + return this; + } + + public Integer getSplitOnCaseChange() { + return splitOnCaseChange; + } + + public WorddelimiterTokenFilter setSplitOnCaseChange(Integer splitOnCaseChange) { + this.splitOnCaseChange = splitOnCaseChange; + return this; + } + + public Integer getCatenateWords() { + return catenateWords; + } + + public WorddelimiterTokenFilter setCatenateWords(Integer catenateWords) { + this.catenateWords = catenateWords; + return this; + } +} + diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ClassicTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ClassicTokenizer.java new file mode 100644 index 000000000..89ea9ae93 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ClassicTokenizer.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class ClassicTokenizer extends Tokenizer { + + static final Integer DEFAULT_MAX_TOKEN_LENGTH = 255; + + /** If a token length is bigger that this, token is split at max token length intervals. */ + @JsonProperty("max_token_length") + final Integer maxTokenLength; + + /** + * Builds a new {@link ClassicTokenizer} using the DEFAULT_MAX_TOKEN_LENGTH. + */ + @JsonCreator + public ClassicTokenizer() { + this.maxTokenLength = DEFAULT_MAX_TOKEN_LENGTH; + } + + /** + * Builds a new {@link ClassicTokenizer} using the specified maxTokenLength. + * + * @param maxTokenLength if a token length is bigger that this, token is split at max token length intervals. + */ + @JsonCreator + public ClassicTokenizer(@JsonProperty("max_token_length") Integer maxTokenLength) { + this.maxTokenLength = getOrDefault(maxTokenLength, DEFAULT_MAX_TOKEN_LENGTH); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/EdgeNGramTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/EdgeNGramTokenizer.java new file mode 100644 index 000000000..016d4a052 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/EdgeNGramTokenizer.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class EdgeNGramTokenizer extends Tokenizer { + static final Integer DEFAULT_MIN_GRAM = 1; + static final Integer DEFAULT_MAX_GRAM = 2; + + /** the smallest n-gram to generate */ + @JsonProperty("min_gram_size") + final Integer minGramSize; + + /** the largest n-gram to generate */ + @JsonProperty("max_gram_size") + final Integer maxGramSize; + + /** + * Builds a new {@link EdgeNGramTokenizer} using the default minGramSize and manGram. + */ + @JsonCreator + public EdgeNGramTokenizer() { + this.minGramSize = DEFAULT_MIN_GRAM; + this.maxGramSize = DEFAULT_MAX_GRAM; + } + + /** + * Builds a new {@link EdgeNGramTokenizer} using the specified minGramSize and manGram. + * + * @param minGram the smallest n-gram to generate + * @param minGram the largest n-gram to generate + */ + @JsonCreator + public EdgeNGramTokenizer(@JsonProperty("min_gram_size") Integer minGram, + @JsonProperty("max_gram_size") Integer maxGram) { + this.minGramSize = getOrDefault(minGram, DEFAULT_MIN_GRAM); + this.maxGramSize = getOrDefault(maxGram, DEFAULT_MAX_GRAM); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/KeywordTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/KeywordTokenizer.java new file mode 100644 index 000000000..3120ae480 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/KeywordTokenizer.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class KeywordTokenizer extends Tokenizer { + + /** + * Builds a new {@link KeywordTokenizer}. + */ + @JsonCreator + public KeywordTokenizer() { + } + +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LetterTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LetterTokenizer.java new file mode 100644 index 000000000..dab8cd458 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LetterTokenizer.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class LetterTokenizer extends Tokenizer { + + /** + * Builds a new {@link LetterTokenizer}. + */ + @JsonCreator + public LetterTokenizer() { + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LowerCaseTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LowerCaseTokenizer.java new file mode 100644 index 000000000..fb1f1a348 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/LowerCaseTokenizer.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class LowerCaseTokenizer extends Tokenizer { + + /** + * Builds a new {@link LowerCaseTokenizer} + */ + @JsonCreator + public LowerCaseTokenizer() { + } + +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/NGramTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/NGramTokenizer.java new file mode 100644 index 000000000..cb4597bea --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/NGramTokenizer.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class NGramTokenizer extends Tokenizer { + + static final Integer DEFAULT_MIN_GRAM = 1; + static final Integer DEFAULT_MAX_GRAM = 2; + + /** the smallest n-gram to generate */ + @JsonProperty("min_gram_size") + final Integer minGramSize; + + /** the largest n-gram to generate */ + @JsonProperty("max_gram_size") + final Integer maxGramSize; + + /** + * Builds a new {@link NGramTokenizer} using the default minGramSize and manGram. + * + */ + @JsonCreator + public NGramTokenizer() { + this.minGramSize = DEFAULT_MIN_GRAM; + this.maxGramSize = DEFAULT_MAX_GRAM; + } + + /** + * Builds a new {@link NGramTokenizer} using the specified minGramSize and manGram. + * + * @param minGramSize the smallest n-gram to generate + * @param maxGramSize the largest n-gram to generate + */ + @JsonCreator + public NGramTokenizer(@JsonProperty("min_gram_size") Integer minGramSize, + @JsonProperty("max_gram_size") Integer maxGramSize) { + this.minGramSize = getOrDefault(minGramSize, DEFAULT_MIN_GRAM); + this.maxGramSize = getOrDefault(maxGramSize, DEFAULT_MAX_GRAM); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PathHierarchyTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PathHierarchyTokenizer.java new file mode 100644 index 000000000..f221aa8a7 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PathHierarchyTokenizer.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class PathHierarchyTokenizer extends Tokenizer { + + static final Boolean REVERSE = false; + static final Character DEFAULT_DELIMITER = '/'; + static final Character DEFAULT_REPLACEMENT = '/'; + static final Integer DEFAULT_SKIP = 0; + + /** terms cache read buffer size */ + @JsonProperty("reverse") + final Boolean reverse; + + /** path separator */ + @JsonProperty("delimiter") + final Character delimiter; + + /** a replacement character for delimiter */ + @JsonProperty("replace") + final Character replace; + + /** number of initial tokens to skip */ + @JsonProperty("skip") + final Integer skip; + + /** + * Builds a new {@link PathHierarchyTokenizer} using the specified bufferSize, delimiter, replacement and skip. + */ + @JsonCreator + public PathHierarchyTokenizer() { + this.reverse = REVERSE; + this.delimiter = DEFAULT_DELIMITER; + this.replace = DEFAULT_REPLACEMENT; + this.skip = DEFAULT_SKIP; + } + + /** + * Builds a new {@link PathHierarchyTokenizer} using the default bufferSize, delimiter, replacement and skip. + * + * @param reverse terms cache read buffer size + * @param delimiter path separator + * @param replace a replacement character for delimiter + * @param skip number of initial tokens to skip + */ + @JsonCreator + public PathHierarchyTokenizer(@JsonProperty("reverse") Boolean reverse, + @JsonProperty("delimiter") Character delimiter, + @JsonProperty("replace") Character replace, + @JsonProperty("skip") Integer skip) { + this.reverse = getOrDefault(reverse, REVERSE); + this.delimiter = getOrDefault(delimiter, DEFAULT_DELIMITER); + this.replace = getOrDefault(replace, DEFAULT_REPLACEMENT); + this.skip = getOrDefault(skip, DEFAULT_SKIP); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PatternTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PatternTokenizer.java new file mode 100644 index 000000000..acae88333 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/PatternTokenizer.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class PatternTokenizer extends Tokenizer { + + static final String DEFAULT_PATTERN = "\\W+"; + static final Integer DEFAULT_GROUP = -1; + + /** java regular expression */ + @JsonProperty("pattern") + final String pattern; + + /** which pattern group to use to generate tokens (-1 for split) */ + @JsonProperty("group") + final Integer group; + + /** + * Builds a new {@link PatternTokenizer} using the default pattern, flags, and group. + */ + @JsonCreator + public PatternTokenizer() { + this.pattern = DEFAULT_PATTERN; + this.group = DEFAULT_GROUP; + } + + /** + * Builds a new {@link PatternTokenizer} using the specified pattern, flags, and group. + * + * @param pattern java regular expression + * @param group a pattern group to use to generate tokens (-1 for split) + */ + @JsonCreator + public PatternTokenizer(@JsonProperty("pattern") String pattern, + @JsonProperty("group") Integer group) { + this.pattern = getOrDefault(pattern, DEFAULT_PATTERN); + this.group = getOrDefault(group, DEFAULT_GROUP); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/StandardTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/StandardTokenizer.java new file mode 100644 index 000000000..5cfe6569a --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/StandardTokenizer.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class StandardTokenizer extends Tokenizer { + + static final Integer DEFAULT_MAX_TOKEN_LENGTH = 255; + + /** If a token length is bigger that this, token is split at max token length intervals. */ + @JsonProperty("max_token_length") + final Integer maxTokenLength; + + /** + * Builds a new {@link StandardTokenizer} using the default bufferSize, delimiter, replacement and skip. + * + */ + @JsonCreator + public StandardTokenizer() { + this.maxTokenLength = DEFAULT_MAX_TOKEN_LENGTH; + } + + /** + * Builds a new {@link StandardTokenizer} using the specified bufferSize, delimiter, replacement and skip. + * + * @param maxTokenLength if a token length is bigger that this, token is split at max token length intervals. + */ + @JsonCreator + public StandardTokenizer(@JsonProperty("max_token_length") Integer maxTokenLength) { + this.maxTokenLength = getOrDefault(maxTokenLength, DEFAULT_MAX_TOKEN_LENGTH); + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ThaiTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ThaiTokenizer.java new file mode 100644 index 000000000..44cf9b936 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/ThaiTokenizer.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class ThaiTokenizer extends Tokenizer { + + /** + * Builds a new {@link ThaiTokenizer} + */ + @JsonCreator + public ThaiTokenizer() { + } + +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/Tokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/Tokenizer.java new file mode 100644 index 000000000..050bc32f1 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/Tokenizer.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.stratio.cassandra.lucene.builder.JSONBuilder; + +/** + * A Lucene {@code Tokenizer}. + * + * @author jpgilaberte@stratio.com {@literal } + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonSubTypes({@JsonSubTypes.Type(value = ClassicTokenizer.class, name = "classic"), + @JsonSubTypes.Type(value = EdgeNGramTokenizer.class, name = "edge_ngram"), + @JsonSubTypes.Type(value = KeywordTokenizer.class, name = "keyword"), + @JsonSubTypes.Type(value = LetterTokenizer.class, name = "letter"), + @JsonSubTypes.Type(value = LowerCaseTokenizer.class, name = "lower_case"), + @JsonSubTypes.Type(value = NGramTokenizer.class, name = "ngram"), + @JsonSubTypes.Type(value = PathHierarchyTokenizer.class, name = "path_hierarchy"), + @JsonSubTypes.Type(value = PatternTokenizer.class, name = "pattern"), + @JsonSubTypes.Type(value = StandardTokenizer.class, name = "standard"), + @JsonSubTypes.Type(value = UAX29URLEmailTokenizer.class, name = "uax29_url_email"), + @JsonSubTypes.Type(value = ThaiTokenizer.class, name = "thai"), + @JsonSubTypes.Type(value = WhitespaceTokenizer.class, name = "whitespace"), + @JsonSubTypes.Type(value = WikipediaTokenizer.class, name = "wikipedia")}) +public abstract class Tokenizer extends JSONBuilder { + + /** + * + * + * @param param the main parameter. + * @param defaultParam the default parameter if main paramaeter is null. + * @param return type must extend {@link Tokenizer} + * @return if (param!=null) { return param; }else{ return defaultParam; } + */ + public static T getOrDefault(T param, T defaultParam) { + if (param == null) { + return defaultParam; + } else { + return param; + } + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/UAX29URLEmailTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/UAX29URLEmailTokenizer.java new file mode 100644 index 000000000..349b0fe8b --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/UAX29URLEmailTokenizer.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class UAX29URLEmailTokenizer extends Tokenizer { + + static final Integer DEFAULT_MAX_TOKEN_LENGTH = 255; + + /** If a token length is bigger that this, token is split at max token length intervals. */ + @JsonProperty("max_token_length") + final Integer maxTokenLength; + + /** + * Builds a new {@link UAX29URLEmailTokenizer} using the default maxTokenLength. + * + */ + @JsonCreator + public UAX29URLEmailTokenizer() { + this.maxTokenLength = DEFAULT_MAX_TOKEN_LENGTH; + + } + + /** + * Builds a new {@link UAX29URLEmailTokenizer} using the specified maxTokenLength. + * + * @param maxTokenLength if a token length is bigger that this, token is split at max token length intervals. + */ + @JsonCreator + public UAX29URLEmailTokenizer(@JsonProperty("max_token_length") Integer maxTokenLength) { + this.maxTokenLength = getOrDefault(maxTokenLength, DEFAULT_MAX_TOKEN_LENGTH); + + } +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WhitespaceTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WhitespaceTokenizer.java new file mode 100644 index 000000000..5f20ce3a6 --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WhitespaceTokenizer.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class WhitespaceTokenizer extends Tokenizer { + + private final String RULE = "java"; + + /** Rule for whiteSpace character [java|unicode] */ + @JsonProperty("rule") + final String rule; + + /** + * Builds a new {@link WhitespaceTokenizer} + */ + @JsonCreator + public WhitespaceTokenizer() { + this.rule = RULE; + } + + /** + * Builds a new {@link WhitespaceTokenizer} with rule. + */ + @JsonCreator + public WhitespaceTokenizer(String rule) { + this.rule = rule; + } + +} diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WikipediaTokenizer.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WikipediaTokenizer.java new file mode 100644 index 000000000..cd6b560cf --- /dev/null +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/tokenizer/WikipediaTokenizer.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Collections; +import java.util.Set; + +/** + * {@link Tokenizer} using a Lucene's {@code Tokenizer}s in classpath. + * + * It's uses the {@code Tokenizer}'s default (no args) constructor. + * + * @author Juan Pedro Gilaberte {@literal } + */ +public class WikipediaTokenizer extends Tokenizer { + + /** + * Builds a new {@link WikipediaTokenizer} + */ + @JsonCreator + public WikipediaTokenizer() {} + +} \ No newline at end of file diff --git a/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzertest.java b/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzertest.java new file mode 100644 index 000000000..0dfe3bc6f --- /dev/null +++ b/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/CustomAnalyzertest.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis; + +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter.AsciifoldingTokenFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter.LowercaseTokenFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenFilter.TokenFilter; +import com.stratio.cassandra.lucene.builder.index.schema.analysis.tokenizer.WhitespaceTokenizer; +import org.junit.Test; + +import static com.stratio.cassandra.lucene.builder.Builder.*; +import static com.stratio.cassandra.lucene.builder.Builder.stringMapper; +import static com.stratio.cassandra.lucene.builder.Builder.uuidMapper; +import static org.junit.Assert.assertEquals; + +/** + * Created by jpgilaberte on 2/06/17. + */ +public class CustomAnalyzertest { + + @Test + public void testIndexFull() { + String actual = index("ks", "table", "idx").keyspace("keyspace") + .column("lucene") + .directoryPath("path") + .refreshSeconds(10D) + .maxCachedMb(32) + .maxMergeMb(16) + .ramBufferMb(64) + .indexingThreads(4) + .indexingQueuesSize(100) + .excludedDataCenters("DC1,DC2") + .sparse(true) + .partitioner(partitionerOnToken(8)) + .defaultAnalyzer("my_analyzer") + .analyzer("my_analyzer", customAnalyzer(new WhitespaceTokenizer(), + null, + new TokenFilter[]{new AsciifoldingTokenFilter(), new LowercaseTokenFilter()})) + .analyzer("snow", snowballAnalyzer("tartar").stopwords("a,b,c")) + .mapper("uuid", uuidMapper().validated(true)) + .mapper("string", stringMapper()) + .build(); + String expected = "CREATE CUSTOM INDEX idx ON keyspace.table(lucene) " + + "USING 'com.stratio.cassandra.lucene.Index' " + + "WITH OPTIONS = {" + + "'refresh_seconds':'10.0'," + + "'directory_path':'path'," + + "'ram_buffer_mb':'64'," + + "'max_merge_mb':'16'," + + "'max_cached_mb':'32'," + + "'indexing_threads':'4'," + + "'indexing_queues_size':'100'," + + "'excluded_data_centers':'DC1,DC2'," + + "'partitioner':'{\"type\":\"token\",\"partitions\":8}'," + + "'sparse':'true'," + + "'schema':'{" + + "\"default_analyzer\":\"my_analyzer\",\"analyzers\":{" + + "\"my_analyzer\":{\"type\":\"custom\",\"tokenizer\":{\"type\":\"whitespace\"},\"token_filter\":[{\"type\":\"asciifolding\",\"preserveOriginal\":false},{\"type\":\"lowercase\"}]}," + + "\"snow\":{\"type\":\"snowball\",\"language\":\"tartar\",\"stopwords\":\"a,b,c\"}}," + + "\"fields\":{" + + "\"uuid\":{\"type\":\"uuid\",\"validated\":true},\"string\":{\"type\":\"string\"}}}'}"; + assertEquals("index serialization is wrong", expected, actual); + } +} diff --git a/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilterTest.java b/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilterTest.java new file mode 100644 index 000000000..1f83e45df --- /dev/null +++ b/builder/src/test/java/com/stratio/cassandra/lucene/builder/index/schema/analysis/charFilter/CharFilterTest.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2014 Stratio (http://stratio.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stratio.cassandra.lucene.builder.index.schema.analysis.charFilter; + +import org.junit.Test; +import java.util.ArrayList; +import static org.junit.Assert.*; + + +/** + * Created by jpgilaberte on 14/06/17. + */ +public class CharFilterTest { + + @Test + public void testHtmlStripCharFilter() { + ArrayList listTags = new ArrayList<>(); + listTags.add("
"); + listTags.add("