org.springframework.data.solr.repository.Query类的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(184)

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

Query介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-data-examples

/**
   * Find the first 10 documents with a match in name or description. Boosting score for search hits in name by 2 sorts
   * documents by relevance.
   *
   * @param name
   * @param description
   * @return
   */
  @Query
  List<Product> findTop10ByNameOrDescription(@Boost(2) String name, String description);
}

代码示例来源:origin: spring-projects/spring-data-solr

/**
 * @return null if {@link Query#defType()} not set
 */
@Nullable
public String getDefType() {
  if (hasQueryAnnotation()) {
    return getQueryAnnotation().defType();
  }
  return null;
}

代码示例来源:origin: spring-projects/spring-data-solr

/**
 * @return null if {@link Query#requestHandler()} not set
 */
@Nullable
public String getRequestHandler() {
  if (hasQueryAnnotation()) {
    return getQueryAnnotation().requestHandler();
  }
  return null;
}

代码示例来源:origin: spring-projects/spring-data-solr

/**
 * @return value of {@link Query#defaultOperator()} or
 *         {@link org.springframework.data.solr.core.query.Query.Operator#NONE} if not set
 */
public org.springframework.data.solr.core.query.Query.Operator getDefaultOperator() {
  if (hasQueryAnnotation()) {
    return getQueryAnnotation().defaultOperator();
  }
  return org.springframework.data.solr.core.query.Query.Operator.NONE;
}

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("project_accession:(?0)")
List<Psm> findByProjectAccessionIn(Collection<String> projectAccessions);
@Query("project_accession:?0")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("assay_accession:?0")
Page<Psm> findByAssayAccession(String assayAccession, Pageable pageable);
@Query("assay_accession:(?0)")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("reported_id:?0")
List<Psm> findByReportedId(String reportedId);
@Query("reported_id:?0 AND project_accession:?1")

代码示例来源:origin: uk.ac.ebi.pride/spectrum-index-search

@Query("project_accession:?0")
Page<Spectrum> findByProjectAccession(String projectAccession, Pageable pageable);
Long countByProjectAccession(String projectAccession);

代码示例来源:origin: uk.ac.ebi.pride/protein-index-search

@Query("id:?0 AND project_accessions:?1")
List<ProteinIdentified> findByAccessionAndProjectAccessions(String accession, String projectAccession);
@Query("project_accessions:(?0)")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("peptide_sequence:?0")
List<Psm> findByPeptideSequence(String peptideSequence);
@Query("peptide_sequence:?0")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("peptide_sequence:?0 AND assay_accession:?1")
Page<Psm> findByPeptideSequenceAndAssayAccession(String peptideSequence, String assayAccession, Pageable pageable);
@Deprecated

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query(value = "assay_accession:?0", filters = "mod_names:(?1)", defaultOperator = AND)
Page<Psm> findByAssayAccessionAndFilterModNames(String assayAccession, List<String> modNames, Pageable pageable);
@Query(value = "assay_accession:?0", filters = "mod_synonyms:(?1)", defaultOperator = AND)

代码示例来源:origin: uk.ac.ebi.pride/protein-index-search

@Query("project_accessions:?0")
List<ProteinIdentified> findByProjectAccessions(String projectAccession);
@Query("id:?0 AND project_accessions:?1")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("id:?0")
List<Psm> findById(String id);
@Query("id:?0")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("project_accession:?0")
List<Psm> findByProjectAccession(String projectAccession);
// Note: wildcard queries are not supported for accession queries, therefore we don't have issues with this count method

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("spectrum_id:?0")
List<Psm> findBySpectrumId(String spectrumId);
@Query("spectrum_id:(?0)")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query("reported_id:?0 AND assay_accession:?1")
List<Psm> findByReportedIdAndAssayAccession(String reportedId, String assayAccession);
@Query("reported_id:?0 AND assay_accession:?1 AND protein_accession:?2 AND peptide_sequence:?3")

代码示例来源:origin: uk.ac.ebi.pride/protein-index-search

@Query("assay_accessions:?0")
List<ProteinIdentified> findByAssayAccessions(String assayAccession);
@Query("assay_accessions:(?0)")

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query(value = "peptide_sequence:?0 AND project_accession:?1")
Page<Psm> findByPeptideSequenceAndProjectAccession(String peptideSequence, String projectAccession, Pageable pageable);
@Deprecated

代码示例来源:origin: uk.ac.ebi.pride/psm-index-search

@Query(value = "project_accession:?0", filters = "mod_names:(?1)", defaultOperator = AND)
Page<Psm> findByProjectAccessionAndFilterModNames(String projectAccession, List<String> modNames, Pageable pageable);
@Query(value = "project_accession:?0", filters = "mod_synonyms:(?1)", defaultOperator = AND)

相关文章