Skip to content
Snippets Groups Projects

Base implementation of Solr+MariaDB combo persistence and index

Open Martin Lowe requested to merge malowe/master/75 into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
47 47 <artifactId>rest-assured</artifactId>
48 48 <scope>test</scope>
49 49 </dependency>
50 <dependency>
51 <groupId>io.quarkus</groupId>
52 <artifactId>quarkus-mongodb-client</artifactId>
53 </dependency>
50 <dependency>
51 <groupId>io.quarkus</groupId>
52 <artifactId>quarkus-hibernate-orm</artifactId>
53 </dependency>
54 <dependency>
55 <groupId>org.hibernate</groupId>
56 <artifactId>hibernate-search-elasticsearch</artifactId>
57 <version>5.11.5.Final</version>
  • Christopher Guindon
  • 41 43 // check for random sort order, which always bypasses cache
    42 String[] sortVals = request.getParameterValues(UrlParameterNames.SORT.getParameterName());
    43 if (sortVals != null) {
    44 for (String sortVal : sortVals) {
    45 // check if the sort order for request matches RANDOM
    46 if (SortOrder.RANDOM.equals(SortOrder.getOrderFromValue(sortVal))) {
    47 setBypass();
    48 return;
    49 }
    44 for (BypassCondition cond : conditions) {
    45 if (cond.matches(requestContext, request)) {
    46 setBypass();
    47 return;
    50 48 }
    51 49 }
    52 50 request.setAttribute(ATTRIBUTE_NAME, Boolean.FALSE);
    • Created by: mbarbero

       	if (conditions.stream().anyMatch(cond -> cond.matches(requestContext, request))) { 
       		setBypass(); 
       	} else {
       		request.setAttribute(ATTRIBUTE_NAME, Boolean.FALSE);
       	}
  • Christopher Guindon
  • 13 *
    14 * @author Martin Lowe
    15 */
    16 @ApplicationScoped
    17 public class SortBypassCondition implements BypassCondition {
    18
    19 @Override
    20 public boolean matches(ContainerRequestContext requestContext, HttpServletRequest request) {
    21 String[] sortVals = request.getParameterValues(UrlParameterNames.SORT.getParameterName());
    22 if (sortVals != null) {
    23 for (String sortVal : sortVals) {
    24 // check if the sort order for request matches RANDOM
    25 if (SortOrder.RANDOM.equals(SortOrder.getOrderFromValue(sortVal))) {
    26 return true;
    27 }
    28 }
    Please register or sign in to reply
    Loading