public class OrQuery
- extends CompositeQuery
Represents a query that will find pages that contain the one word OR another (or both). Normally Google requires
a page to have all the words in a query as in an AND query.
Used by getSearchString to build up the query string recursively from the
|Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public OrQuery(Query left,
- Create an OR query. The words of the left query OR those of the right: "Joseph" OR "Bergin" without requiring both
Words. Normally left and right are Simple Queries.
left - the term to the left of the OR logical operator
right - the search term to the right of the operator.
public java.lang.String buildSearchString(java.util.List<Query> start,
- Description copied from class:
- Used by getSearchString to build up the query string recursively from the
parts. Note that the work is done on the unwinding phase of the
recursion. Those query fragments that must appear first or last in a
query string defer being added to the string until the end, by putting a
reference to themselves intoone of the two lists. These lists are then
processed at the end after some verification.
- Specified by:
buildSearchString in class
start - the list of query objects that must come first in a Google
finish - the list of query objects that must come last in a Google
query. e.g. site:
- the query string