org.springframework.data.solr.repository.Highlight Java Examples

The following examples show how to use org.springframework.data.solr.repository.Highlight. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BookRepository.java    From Spring-data-solr-example with Apache License 2.0 4 votes vote down vote up
@Highlight(prefix = "<highlight>", postfix = "</highlight>")
HighlightPage<Book> findByDescription(String description, Pageable pageable);
 
Example #2
Source File: ProductRepository.java    From spring-data-solr-showcase with Apache License 2.0 4 votes vote down vote up
@Highlight(prefix = "<b>", postfix = "</b>")
@Query(fields = { SearchableProductDefinition.ID_FIELD_NAME, SearchableProductDefinition.NAME_FIELD_NAME,
		SearchableProductDefinition.PRICE_FIELD_NAME, SearchableProductDefinition.FEATURES_FIELD_NAME,
		SearchableProductDefinition.AVAILABLE_FIELD_NAME }, defaultOperator = Operator.AND)
HighlightPage<Product> findByNameIn(Collection<String> names, Pageable page);
 
Example #3
Source File: ProductRepository.java    From spring-data-examples with Apache License 2.0 2 votes vote down vote up
/**
 * Find documents with matching description, highlighting context within a 20 char range around the hit.
 *
 * @param description
 * @param page
 * @return
 */
@Highlight(fragsize = 20, snipplets = 3)
HighlightPage<Product> findByDescriptionStartingWith(String description, Pageable page);