当前位置: 首页>>代码示例>>Java>>正文


Java Analyzer类代码示例

本文整理汇总了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;
	}
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:22,代码来源:Article.java

示例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();
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:14,代码来源:User.java

示例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;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:10,代码来源:GenericListItem.java

示例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;
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:13,代码来源:Article.java

示例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;
}
 
开发者ID:justinbaby,项目名称:my-paper,代码行数:14,代码来源:Product.java

示例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;
}
 
开发者ID:MTUHIDE,项目名称:CoCoTemp,代码行数:12,代码来源:User.java

示例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();
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:13,代码来源:ConceptRelationshipJpa.java

示例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();
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:13,代码来源:AtomSubsetMemberJpa.java

示例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;
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:14,代码来源:MappingJpa.java

示例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;
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:14,代码来源:MappingJpa.java

示例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();
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:13,代码来源:ConceptTreePositionJpa.java

示例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;
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:11,代码来源:AtomJpa.java

示例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;
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:15,代码来源:LexicalClassJpa.java

示例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;
}
 
开发者ID:WestCoastInformatics,项目名称:UMLS-Terminology-Server,代码行数:9,代码来源:AbstractAtomClass.java


注:本文中的org.hibernate.search.annotations.Analyzer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。