org.hibernate.search.annotations.Analyzer类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.hibernate.search.annotations.Analyzer类的一些代码示例,展示了Analyzer类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer类的具体详情如下:
包路径:org.hibernate.search.annotations.Analyzer
类名称:Analyzer

Analyzer介绍

暂无

代码示例

代码示例来源:origin: openmrs/openmrs-core

@Field(name = "givenNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(8f)),
    @Field(name = "givenNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(4f)),
    @Field(name = "givenNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER), boost = @Boost(2f))
})
private String givenName;
    @Field(name = "middleNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
    @Field(name = "middleNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
    @Field(name = "middleNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String middleName;
    @Field(name = "familyNameExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(8f)),
    @Field(name = "familyNameStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(4f)),
    @Field(name = "familyNameAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER), boost = @Boost(2f)),
})
private String familyName;
    @Field(name = "familyName2Exact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
    @Field(name = "familyName2Start", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
    @Field(name = "familyName2Anywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER)),
})
private String familyName2;

代码示例来源:origin: hibernate/hibernate-search

public static AnalyzerReference getAnalyzerReference(org.hibernate.search.annotations.Analyzer analyzerAnn,
    ConfigContext configContext, IndexManagerType indexManagerType) {
  MutableAnalyzerRegistry registry = indexManagerType == null ? null
      : configContext.forType( indexManagerType ).getAnalyzerRegistry();
  Class<?> analyzerClass = analyzerAnn == null ? void.class : analyzerAnn.impl();
  if ( analyzerClass != void.class ) {
    return registry.getOrCreateAnalyzerReference( analyzerClass );
  }
  else {
    String definition = analyzerAnn == null ? "" : analyzerAnn.definition();
    if ( StringHelper.isEmpty( definition ) ) {
      return null;
    }
    return registry.getOrCreateAnalyzerReference( definition );
  }
}

代码示例来源:origin: openmrs/openmrs-core

@Field(name = "valuePhrase", analyzer = @Analyzer(definition = LuceneAnalyzers.PHRASE_ANALYZER), boost = @Boost(8f)),
    @Field(name = "valueExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
    @Field(name = "valueStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
    @Field(name = "valueAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String value;

代码示例来源:origin: org.infinispan/infinispan-embedded-query

public static AnalyzerReference getAnalyzerReference(org.hibernate.search.annotations.Analyzer analyzerAnn,
    ConfigContext configContext, IndexManagerType indexManagerType) {
  MutableAnalyzerRegistry registry = indexManagerType == null ? null
      : configContext.forType( indexManagerType ).getAnalyzerRegistry();
  Class<?> analyzerClass = analyzerAnn == null ? void.class : analyzerAnn.impl();
  if ( analyzerClass != void.class ) {
    return registry.getOrCreateAnalyzerReference( analyzerClass );
  }
  else {
    String definition = analyzerAnn == null ? "" : analyzerAnn.definition();
    if ( StringHelper.isEmpty( definition ) ) {
      return null;
    }
    return registry.getOrCreateAnalyzerReference( definition );
  }
}

代码示例来源:origin: openmrs/openmrs-core

@Field(name = "identifierPhrase", analyzer = @Analyzer(definition = LuceneAnalyzers.PHRASE_ANALYZER), boost = @Boost(8f)),
    @Field(name = "identifierExact", analyzer = @Analyzer(definition = LuceneAnalyzers.EXACT_ANALYZER), boost = @Boost(4f)),
    @Field(name = "identifierStart", analyzer = @Analyzer(definition = LuceneAnalyzers.START_ANALYZER), boost = @Boost(2f)),
    @Field(name = "identifierAnywhere", analyzer = @Analyzer(definition = LuceneAnalyzers.ANYWHERE_ANALYZER))
})
private String identifier;

代码示例来源:origin: zanata/zanata-platform

@NotNull
@Size(max = 500)
@Field(analyzer = @Analyzer(impl = StandardAnalyzer.class))
public String getContent() {
  return content;
}

代码示例来源:origin: jaxio/generated-projects

@Size(max = 100)
@Column(name = "FIRST_NAME", length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getFirstName() {
  return firstName;
}

代码示例来源:origin: jaxio/generated-projects

@Size(max = 100)
@Column(name = "LAST_NAME", length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getLastName() {
  return lastName;
}

代码示例来源:origin: jaxio/generated-projects

@NotEmpty
@Size(max = 100)
@Column(name = "CITY", nullable = false, length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getCity() {
  return city;
}

代码示例来源:origin: jaxio/generated-projects

@NotEmpty
@Size(max = 100)
@Column(name = "DOCUMENT_FILE_NAME", nullable = false, length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getDocumentFileName() {
  return documentFileName;
}

代码示例来源:origin: jaxio/generated-projects

@NotEmpty
@Size(min = 4, max = 100)
@Column(name = "LOGIN", nullable = false, unique = true, length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getUsername() {
  return username;
}

代码示例来源:origin: jaxio/generated-projects

@NotEmpty
@Size(max = 100)
@Column(name = "ROLE_NAME", nullable = false, unique = true, length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getRoleName() {
  return roleName;
}

代码示例来源:origin: jaxio/generated-projects

@NotEmpty
@Size(max = 100)
@Column(name = "TITLE", nullable = false, length = 100)
@Field(analyzer = @Analyzer(definition = "custom"))
public String getBookTitle() {
  return bookTitle;
}

代码示例来源:origin: org.artificer/artificer-repository-hibernate

/**
 * @author Brett Meyer.
 */
@Entity
@Indexed
@Analyzer(impl = StandardAnalyzer.class)
@Table(name = "Document")
public class ArtificerDocumentArtifact extends ArtificerArtifact {

  @Override
  @Transient
  public boolean isDocument() {
    return true;
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Analyzer
public static class D {
}

代码示例来源:origin: org.artificer/artificer-repository-hibernate

/**
 * @author Brett Meyer.
 */
@Entity
@Indexed
@Analyzer(impl = StandardAnalyzer.class)
@Table(name = "WsdlDerived")
public class ArtificerWsdlDerivedArtifact extends ArtificerArtifact {

  private List<ArtificerWsdlDerivedArtifact> extension = new ArrayList<>();

  @OneToMany(cascade = CascadeType.ALL)
  public List<ArtificerWsdlDerivedArtifact> getExtension() {
    return extension;
  }

  public void setExtension(List<ArtificerWsdlDerivedArtifact> extension) {
    this.extension = extension;
  }
}

代码示例来源:origin: com.silicolife.textmining/core

@Fields(value = { 
    @Field(name="authorsCS",index=Index.YES, analyze=Analyze.YES, analyzer = @Analyzer(definition="KeywordsSplitter"), store=Store.NO),
    @Field(name="authorsNCS",index=Index.YES, analyze=Analyze.YES,analyzer = @Analyzer(definition="toLowerCase"), store=Store.NO)			
})
@Column(name = "pub_authors", length = 65535)
public String getPubAuthors() {
  return this.pubAuthors;
}

代码示例来源:origin: com.silicolife.textmining/core

@Fields(value = { 
    @Field(name="notesCS",index=Index.YES, analyze=Analyze.YES, analyzer = @Analyzer(definition="KeywordsSplitter"), store=Store.NO),
    @Field(name="notesNCS",index=Index.YES, analyze=Analyze.YES,analyzer = @Analyzer(definition="toLowerCase"), store=Store.NO)			
})
@Column(name = "pub_notes", length = 65535)
public String getPubNotes() {
  return this.pubNotes;
}

代码示例来源:origin: com.silicolife.textmining/core

@Fields(value = { 
    @Field(name="abstractCS",index=Index.YES, analyze=Analyze.YES, analyzer = @Analyzer(definition="KeywordsSplitter"), store=Store.NO),
    @Field(name="abstractNCS",index=Index.YES, analyze=Analyze.YES,analyzer = @Analyzer(definition="toLowerCase"), store=Store.NO)			
})
@Column(name = "pub_abstract")
public String getPubAbstract() {
  return this.pubAbstract;
}

代码示例来源:origin: com.silicolife.textmining/core

@Fields(value = { 
    @Field(name="titleCS",index=Index.YES, analyze=Analyze.YES, analyzer = @Analyzer(definition="KeywordsSplitter"), store=Store.NO),
    @Field(name="titleNCS",index=Index.YES, analyze=Analyze.YES,analyzer = @Analyzer(definition="toLowerCase"), store=Store.NO)			
})

@Column(name = "pub_title", length = 65535)
public String getPubTitle() {
  return this.pubTitle;
}

相关文章