<commit_before>package br.gov.servicos.cms;

import br.gov.servicos.v3.schema.Servico;
import com.github.slugify.Slugify;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.Value;
import lombok.experimental.Wither;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;

import static br.gov.servicos.config.PortalDeServicosIndex.IMPORTADOR;
import static lombok.AccessLevel.PRIVATE;
import static org.springframework.data.elasticsearch.annotations.FieldType.String;

@Value
@Wither
@AllArgsConstructor(access = PRIVATE)
@Document(indexName = IMPORTADOR, type = "conteudo")
public class Conteudo {

    @Id
    String id;

    @Field(store = true, type = String)
    String nome;

    @Field(store = true, type = String)
    String conteudo;

    @Field(type = String, store = true, index = FieldIndex.not_analyzed)
    String conteudoHtml;

    @Field(store = true, type = String)
    String tipoConteudo;

    public Conteudo() {
        this(null, null, null, null, null);
    }

    @SneakyThrows
    public static Conteudo fromServico(Servico servico) {
        return new Conteudo()
                .withId(new Slugify().slugify(servico.getNome() + " " + (servico.getSigla() == null ? "" : servico.getSigla())))
                .withTipoConteudo("servico")
                .withNome(servico.getNome())
                .withConteudo(servico.getDescricao());
    }
}
<commit_msg>Não usa a sigla do servico no slug<commit_after>package br.gov.servicos.cms;

import br.gov.servicos.v3.schema.Servico;
import com.github.slugify.Slugify;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.Value;
import lombok.experimental.Wither;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;

import static br.gov.servicos.config.PortalDeServicosIndex.IMPORTADOR;
import static lombok.AccessLevel.PRIVATE;
import static org.springframework.data.elasticsearch.annotations.FieldType.String;

@Value
@Wither
@AllArgsConstructor(access = PRIVATE)
@Document(indexName = IMPORTADOR, type = "conteudo")
public class Conteudo {

    @Id
    String id;

    @Field(store = true, type = String)
    String nome;

    @Field(store = true, type = String)
    String conteudo;

    @Field(type = String, store = true, index = FieldIndex.not_analyzed)
    String conteudoHtml;

    @Field(store = true, type = String)
    String tipoConteudo;

    public Conteudo() {
        this(null, null, null, null, null);
    }

    @SneakyThrows
    public static Conteudo fromServico(Servico servico) {
        return new Conteudo()
                .withId(new Slugify().slugify(servico.getNome()))
                .withTipoConteudo("servico")
                .withNome(servico.getNome())
                .withConteudo(servico.getDescricao());
    }
}

{'fraction_non_alphanumeric': 0.10745891276864729, 'fraction_numerical': 0.0006321112515802782, 'mean_word_length': 3.83206106870229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1683773', 'n_tokens_mistral': 1012, 'n_tokens_neox': 994, 'n_words': 194}