Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Feature/build custom analyzer #328

Open
wants to merge 40 commits into
base: branch-3.0.13
Choose a base branch
from

Conversation

jpgilaberte
Copy link
Member

No description provided.

import java.util.ArrayList;

/**
* Created by jpgilaberte on 30/05/17.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pease put author label like this

import com.stratio.cassandra.lucene.builder.JSONBuilder;

/**
* Created by jpgilaberte on 25/05/17.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Created by jpgilaberte on 25/05/17.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Created by jpgilaberte on 30/05/17.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==

return new CustomAnalyzer(tokenizer, charFilter, tokenFilter);
}

public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just copy the comments before here

return new CustomAnalyzer(tokenizer, null, tokenFilter);
}

/**
* Returns a new {@link Search}.
*
* @return a new search
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deberia haber una fucnion de construccion para cada uno de los charfilters, tokenizers, analyzer.... en el Builder.java. Se que Builder.java se puede contruir en un monstruo pero asi le facilitamos la tarea al ususario que solo tioene que impoortar una clase como aqui using java query builder. No se si java nos permite trocearlo en varias clases importadads ene lbuilder,l asi podriamos clasificarlo y no tendriamo en monstruo. Estas funciones deben tener javadoc. Me immporta poco que los contrauctores no lo tengan pero justo y solo esta clase si deberia tenerlos porque el ususario tarabaja con el builder y el ctrl space es nuetsro amigo.

*/
public class SwedishlightstemTokenFilter extends TokenFilter{

@JsonCreator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realmente, al haber copiado las clases del plugin el JSoncreator no hace falta porque desde el builder solo se crean jsones y no al reves.

public class SynonymTokenFilter extends TokenFilter{

@JsonCreator
public SynonymTokenFilter(){}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Como lo que te decia antes. no puede haber constructoir sin los parametros obligatorios. Es decoir este constructor sobra.

@@ -1522,9 +1919,9 @@ into your Cassandra installation lib directory.
**Example 2:** Index only the centroid of the WKT shape contained in the indexed column:

.. image:: /doc/resources/geo_shape_mapper_example_2.png
:width: 100%
:width: 100%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

el formato que te pase no vale para los rst y cambia la indentacion de las imagenes no debería

}

object CharFilterBuilder{
final val ESCAPED_TAGS = "escapedtags"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Como he dicho antes los jsones deben ir 'escaped_tags'

test("mapParsed function") {
// val testBuilderChild = TestBuilderChild()
// val mapParsedTest = testBuilderChild.mapParsed
// assert(mapParsedTest.size == 3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condigo comnetando no or favor, si son tets paara el futuor wikipedia contsructor hazte una rama aparte y ponlo ahí, ny ay cuando suabmos version lo mergeamos

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants