add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / queryparser / README.txt
1 Description of Surround:
2
3 Surround consists of operators (uppercase/lowercase):
4
5 AND/OR/NOT/nW/nN/() as infix and
6 AND/OR/nW/nN        as prefix.
7
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:
11
12 20n(aa*, bb*, cc*)
13
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.
20
21
22 Query terms from the Lucene standard query parser:
23
24 field:termtext
25 ^ boost
26 * internal and suffix truncation
27 ? one character
28
29
30 Some examples:
31
32 aa
33 aa and bb
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
36
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
40
41 20n(aa*,bb*)
42 3w(a?a or bb?, cc*)
43
44 title: text: aa
45 title : text : aa or bb
46 title:text: aa not bb
47 title:aa not text:bb
48
49 cc 3w dd               infix: dual.
50
51 cc N dd N ee           same effect as:   (cc N dd) N ee
52
53 text: aa 3d bb
54
55 For examples on using the Surround language, see the
56 test packages.
57
58
59 Development status
60
61 Not tested: multiple fields, internally mapped to OR queries,
62 not compared to Lucene's MultipleFieldQuery.
63
64 * suffix truncation is implemented very similar to Lucene's PrefixQuery.
65
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.
69
70 Warnings about missing terms are sent to System.out, this might
71 be replaced by another stream, and tested for in the tests.
72
73 BooleanQueryTst.TestCollector uses a results checking method that should
74 be replaced by the checking method from Lucene's TestBasics.java.