Skip to content

Commit 2b263a4

Browse files
authoredJun 5, 2018
Merge pull request ajaxorg#3661 from crispthinking/lucene-fixes
lucene: highlight rules improvements
2 parents c62e50a + f0bb9ac commit 2b263a4

File tree

3 files changed

+378
-86
lines changed

3 files changed

+378
-86
lines changed
 

‎lib/ace/mode/_test/text_lucene.txt

+56-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,57 @@
1-
test: recognises AND as keyword
2-
test: recognises OR as keyword
3-
test: recognises NOT as keyword
4-
test: recognises "hello this is dog" as string
5-
test: recognises -"hello this is dog" as negation with string
6-
test: recognises ~100 as text with proximity
7-
test: recognises "hello this is dog"~100 as string with proximity
8-
test: recognises raw:"hello this is dog" as keyword
9-
test: recognises raw:foo as"keyword'
10-
test: recognises "(" as opening parenthesis
11-
test: recognises ")" as closing parenthesis
12-
test: recognises foo* as text with asterisk
13-
test: recognises foo? as text with interro
14-
test: recognises single word as text
151
foo
16-
2+
foo: foo AND bar
3+
foo AND bar
4+
foo OR bar
5+
foo NOT bar
6+
"foo bar"
7+
bar "foo bar"
8+
bar -foo
9+
bar -"foo bar"
10+
-foo
11+
-"foo bar"
12+
bar foo~100
13+
foo~100
14+
foo~100 bar
15+
"foo bar"~10
16+
foo~
17+
bar foo~
18+
foo~ bar
19+
foo~0.8
20+
field:foo
21+
field:foo bar
22+
field:"foo bar"
23+
(foo AND bar)
24+
(field:foo AND field:"bar baz")
25+
foo*
26+
f?o
27+
f*o
28+
+foo
29+
+"foo bar"
30+
foo?
31+
?oo
32+
foo
33+
field:(-foo +bar +"foo bar")
34+
field:{foo TO bar}
35+
field:[foo TO bar]
36+
field:["a b c" TO def]
37+
field:{"a b c" TO def}
38+
field:{foo TO "bar"}
39+
field:{20180101 TO 20190202}
40+
field:{"2018-01-01" TO "2019-02-02"}
41+
\+escaped
42+
\-escaped
43+
esc\&aped
44+
esc\|aped
45+
\!escaped
46+
\(escaped\)
47+
\{escaped\}
48+
\[escaped\]
49+
escaped\^4
50+
\"escaped\"
51+
escaped\~0.4
52+
escaped\*
53+
escaped\?
54+
esc\:aped
55+
esc\\aped
56+
esc\ aped:foo
57+
"foo\"bar"

0 commit comments

Comments
 (0)
Please sign in to comment.