/** * 获取内容 * * @return 内容 */ @Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class)) @Lob public String getContent() { if (pageNumber != null) { String[] pageContents = getPageContents(); if (pageNumber < 1) { pageNumber = 1; } if (pageNumber > pageContents.length) { pageNumber = pageContents.length; } return pageContents[pageNumber - 1]; } else { return content; } }
@Field(analyzer = @Analyzer(definition = HibernateSearchAnalyzer.TEXT_SORT)) @SortableField public String getSortName() { StringBuilder builder = new StringBuilder(); if(getLastName() != null) { builder.append(getLastName()); builder.append(" "); } if(getFirstName() != null) { builder.append(getFirstName()); } return builder.toString().trim(); }
@Override @Fields({ @Field(name = CODE_FIELD_NAME, analyzer = @Analyzer(definition = HibernateSearchAnalyzer.KEYWORD)), @Field(name = CODE_SORT_FIELD_NAME, analyzer = @Analyzer(definition = HibernateSearchAnalyzer.TEXT_SORT)) }) @SortableField(forField = CODE_SORT_FIELD_NAME) public String getCode() { return null; }
/** * 获取标题 * * @return 标题 */ @Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class)) @NotEmpty @Length(max = 200) @Column(nullable = false) public String getTitle() { return title; }
/** * 获取名称 * * @return 名称 */ @JsonProperty @Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class)) @NotEmpty @Length(max = 200) @Column(nullable = false) public String getName() { return name; }
/** * Gets username. * * @return the username */ @Field(index = org.hibernate.search.annotations.Index.YES, analyze = Analyze.YES, store = Store.NO) @Analyzer(impl = KeywordAnalyzer.class) public String getUsername() { return username; }
/** * Returns the from term. For JAXB. * * @return the from term */ @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "fromNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getFromName() { return from == null ? null : from.getName(); }
/** * Returns the from name. * * @return the from name */ @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "fromNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getFromName() { return fromName; }
/** * Returns the member name. For JAXB. * * @return the member name */ @Fields({ @Field(index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "memberNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getMemberName() { return member == null ? null : member.getName(); }
/** * Returns the from term. For JAXB. * * @return the from term */ @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "fromNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) @Override public String getFromName() { return fromName; }
/** * Returns the to term. For JAXB. * * @return the to term */ @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "toNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) @Override public String getToName() { return toName; }
/** * Returns the node name. For JAXB. * * @return the node name */ @Fields({ @Field(name = "nodeName", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "nodeNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getNodeName() { return node == null ? null : node.getName(); }
@Override @Fields({ @Field(name = "name", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "nameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO), @Field(name = "edgeNGramName", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "autocompleteEdgeAnalyzer")), @Field(name = "nGramName", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "autocompleteNGramAnalyzer")) }) public String getName() { return name; }
/** * Returns the normalized string. * * @return the normalized string */ @Override @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO), @Field(name = "normalizedNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) @Analyzer(definition = "noStopWord") public String getNormalizedName() { return normalizedName; }
@Override @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "nameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getName() { return name; }
/** * Returns the from name. For JAXB. * * @return the from name */ @Fields({ @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "fromNameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getFromName() { return from == null ? null : from.getName(); }
@Override @Fields({ @Field(name = "name", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "noStopWord"), bridge = @FieldBridge(impl = SplitUnderscoreBridge.class)), @Field(name = "nameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO) }) public String getName() { return name; }
/** * Gets the name. * * @return the name */ @Fields({ @Field(name = "name", index = Index.YES, store = Store.NO, analyze = Analyze.YES, analyzer = @Analyzer(definition = "noStopWord")), @Field(name = "nameSort", index = Index.YES, analyze = Analyze.NO, store = Store.NO), }) @Override public String getName() { return name; }
@Column(name = DbColumnNames.CONTENT, nullable = false) @Fields({ @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.EDGE_NGRAM), boost = @Boost(0.75F), name = DbFieldNames.CONTENT_EDGE_NGRAM), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.LOWERCASE), name = DbFieldNames.CONTENT_LOWERCASE), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.NGRAM), boost = @Boost(0.5F), name = DbFieldNames.CONTENT_NGRAM), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.PHONETIC), boost = @Boost(0.25F), name = DbFieldNames.CONTENT_PHONETIC) }) @Lob @Override public String getContent() { return this.content; }
@Column(name = DbColumnNames.TEXT) @Fields({ @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.EDGE_NGRAM), boost = @Boost(0.75F), name = DbFieldNames.TEXT_EDGE_NGRAM), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.LOWERCASE), name = DbFieldNames.TEXT_LOWERCASE), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.NGRAM), boost = @Boost(0.5F), name = DbFieldNames.TEXT_NGRAM), @Field(analyzer = @Analyzer(definition = DbAnalyzerNames.PHONETIC), boost = @Boost(0.25F), name = DbFieldNames.TEXT_PHONETIC) }) @Lob @Nullable @Override public String getText() { return this.text; }
/** * 获取介绍 * * @return 介绍 */ @Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class)) @Lob public String getIntroduction() { return introduction; }
/** * 获取搜索关键词 * * @return 搜索关键词 */ @Field(store = Store.YES, index = Index.TOKENIZED, analyzer = @Analyzer(impl = IKAnalyzer.class)) @Length(max = 200) public String getKeyword() { return keyword; }
@Field(analyze = Analyze.YES) @Analyzer(definition = "custom") @Basic public String getAuthor() { return author; }
@Basic @Field(analyze = Analyze.YES) @Analyzer(definition = "custom") public String getTitle() { return title; }
@Basic @Field(analyze = Analyze.YES) @Analyzer(definition = "custom") public String getDescription() { return description; }
@Field(analyze = Analyze.YES) @Analyzer(definition = "custom") @Basic public String getGenre() { return genre; }
@Basic @Field(analyze = Analyze.YES) @Analyzer(definition = "custom") public String getLang() { return lang; }
@Basic @Analyzer(definition = "custom") @Field(analyze = Analyze.YES) public String getIsbn() { return isbn; }
@Field(analyze = Analyze.YES) @Analyzer(definition = "custom") @Basic public String getLocation() { return location; }
@Override @Field(name = LABEL_AUTOCOMPLETE, analyzer = @Analyzer(definition = HibernateSearchAnalyzer.KEYWORD_CLEAN)) public String getLabel() { return super.getLabel(); }
@Field @Analyzer(definition = "UrlAnalyzer") public String getUrl() { return url; }
@Field(analyzer = @Analyzer(definition = "nameAnalyzer")) @Transient @JsonIgnore public String getFullName() { return Joiner.on(' ').join(prenom, nom); }
@Field(store = Store.YES) @Analyzer(definition = "customanalyzer") public String getTitle() { return title; }