本文整理汇总了Java中org.hibernate.search.annotations.Analyzer类的典型用法代码示例。如果您正苦于以下问题:Java Analyzer类的具体用法?Java Analyzer怎么用?Java Analyzer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Analyzer类属于org.hibernate.search.annotations包,在下文中一共展示了Analyzer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getContent
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 获取内容
*
* @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;
}
}
示例2: getSortName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
@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();
}
示例3: getCode
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
@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;
}
示例4: getTitle
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 获取标题
*
* @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;
}
示例5: getName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 获取名称
*
* @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;
}
示例6: getUsername
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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;
}
示例7: getFromName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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();
}
示例8: getFromName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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;
}
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:13,代码来源:ComponentInfoRelationshipJpa.java
示例9: getMemberName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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();
}
示例10: getFromName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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;
}
示例11: getToName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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;
}
示例12: getNodeName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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();
}
示例13: getName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
@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;
}
示例14: getNormalizedName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
/**
* 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;
}
示例15: getName
import org.hibernate.search.annotations.Analyzer; //导入依赖的package包/类
@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;
}