1 Description of Surround:
3 Surround consists of operators (uppercase/lowercase):
5 AND/OR/NOT/nW/nN/() as infix and
6 AND/OR/nW/nN as prefix.
8 Distance operators W and N have default n=1, max 99.
9 Implemented as SpanQuery with slop = (n - 1).
10 An example prefix form is:
14 The name Surround was chosen because of this prefix form
15 and because it uses the newly introduced span queries
16 to implement the proximity operators.
17 The names of the operators and the prefix and suffix
18 forms have been borrowed from various other query
19 languages described on the internet.
22 Query terms from the Lucene standard query parser:
26 * internal and suffix truncation
34 aa and bb or cc same effect as: (aa and bb) or cc
35 aa NOT bb NOT cc same effect as: (aa NOT bb) NOT cc
37 and(aa,bb,cc) aa and bb and cc
38 99w(aa,bb,cc) ordered span query with slop 98
39 99n(aa,bb,cc) unordered span query with slop 98
45 title : text : aa or bb
51 cc N dd N ee same effect as: (cc N dd) N ee
55 For examples on using the Surround language, see the
61 Not tested: multiple fields, internally mapped to OR queries,
62 not compared to Lucene's MultipleFieldQuery.
64 * suffix truncation is implemented very similar to Lucene's PrefixQuery.
66 Wildcards (? and internal *) are implemented with regular expressions
67 to allow further variations. A reimplementation using
68 WildCardTermEnum (correct name?) should be no problem.
70 Warnings about missing terms are sent to System.out, this might
71 be replaced by another stream, and tested for in the tests.
73 BooleanQueryTst.TestCollector uses a results checking method that should
74 be replaced by the checking method from Lucene's TestBasics.java.