/** * Defines a NEAR query over the list of query definitions * with specified parameters. * @param minimumDistance the minimum distance (in number of words) between any two matching * queries * @param maximumDistance the maximum distance (in number of words) between any two matching * queries * @param weight the weight for the query * @param order the ordering for the query terms * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public StructuredQueryDefinition near(int minimumDistance, int maximumDistance, double weight, Ordering order, StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(minimumDistance, maximumDistance, weight, order, queries); }
/** * Defines a NEAR query over the list of query definitions * with specified parameters. * @param maximumDistance the maximum distance (in number of words) between any two matching * queries * @param weight the weight for the query * @param order the ordering for the query terms * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public StructuredQueryDefinition near(int maximumDistance, double weight, Ordering order, StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(null, maximumDistance, weight, order, queries); }
/** * Defines a NEAR query over the list of query definitions * with specified parameters. * @param distance the proximity for the query terms * @param weight the weight for the query * @param order the ordering for the query terms * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public NearQuery near(int distance, double weight, Ordering order, StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(distance, weight, order, queries); }
/** * Defines a NEAR query over the list of query definitions * with default parameters. * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public StructuredQueryDefinition near(StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(queries); }
/** * Defines a NEAR query over the list of query definitions * with default parameters. * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public NearQuery near(StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(queries); }