Package org.elasticsearch.index.query

Examples of org.elasticsearch.index.query.OrFilterBuilder


                }
                addFilter( andFilterBuilder, filterBuilder );
            }
            else if( spec instanceof OrSpecification )
            {
                OrFilterBuilder orFilterBuilder = new OrFilterBuilder();
                for( Specification<Composite> operand : operands )
                {
                    processSpecification( orFilterBuilder, operand, variables );
                }
                addFilter( orFilterBuilder, filterBuilder );
View Full Code Here


class DeleteQueryBuilder {

    public String unsupportedProjectEntriesQuery(String projectId, List<String> supportedVersions) {
        QueryBuilder query = QueryBuilders.matchAllQuery();

        OrFilterBuilder supportedVersionsFilter = matchSupportedVersions(supportedVersions);
        NotFilterBuilder notSupportedVersionFilter = new NotFilterBuilder(supportedVersionsFilter);

        TermFilterBuilder projectFilter = new TermFilterBuilder("projectId", projectId);

        AndFilterBuilder filter = new AndFilterBuilder(notSupportedVersionFilter, projectFilter);
View Full Code Here

        return filteredQuery.toString();
    }

    private OrFilterBuilder matchSupportedVersions(List<String> supportedVersions) {
        OrFilterBuilder orFilter = new OrFilterBuilder();
        for (String supportedVersion : supportedVersions) {
            orFilter.add(new TermFilterBuilder("version", supportedVersion));
        }
        return orFilter;
    }
View Full Code Here

            if (projects.size() > 0) {
                projectApiRefAnded.add(new TermsFilterBuilder("facetPaths", projects).execution("or"));
            }

            OrFilterBuilder outermostFilter = new OrFilterBuilder();
            outermostFilter.add(projectApiRefAnded);
            if (otherFacetPaths.size() > 0) {
                outermostFilter.add(new TermsFilterBuilder("facetPaths", otherFacetPaths).execution("or"));
            }

            filterBuilder.add(outermostFilter);
        }
    }
View Full Code Here

  }

  public Result<QProfileActivity> searchActivities(QProfileActivityQuery query, QueryContext options) {
    DbSession session = db.openSession(false);
    try {
      OrFilterBuilder activityFilter = FilterBuilders.orFilter();
      for (String profileKey : query.getQprofileKeys()) {
        activityFilter.add(FilterBuilders.nestedFilter("details",
          QueryBuilders.matchQuery("details.profileKey", profileKey)));
      }

      SearchResponse response = index.get(ActivityIndex.class).search(query, options, activityFilter);
      Result<QProfileActivity> result = new Result<QProfileActivity>(response);
View Full Code Here

                    {
                        preInterFilter = new AndFilterBuilder(preIntraFilter, currentFilter);
                    }
                    else if (interFilter.equalsIgnoreCase("or"))
                    {
                        preInterFilter = new OrFilterBuilder(preIntraFilter, currentFilter);
                    }
                }

                preIntraFilter = currentFilter;
            }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.query.OrFilterBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.