Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

new api for Automaton traversing #5

Closed
DmitryKey opened this issue Oct 7, 2014 · 1 comment
Closed

new api for Automaton traversing #5

DmitryKey opened this issue Oct 7, 2014 · 1 comment

Comments

@DmitryKey
Copy link
Owner

o.a.l.u.automaton.Automaton api has changed in lucene 4.10 (https://issues.apache.org/jira/secure/attachment/12651171/LUCENE-5752.patch).
Method getNumberedStates() got dropped
class State does not exist anymore.

Affects Explain structure feature in Luke's ui.

@DmitryKey
Copy link
Owner Author

Implemented changes, following example of traversal found in lucene's source code (pointed to
by Mike McCandless):

https://github.com/apache/lucene-solr/blob/2836bd99101026860b12233a87e35101769a538f/lucene/core/src/java/org/apache/lucene/util/automaton/Automaton.java#L535

With the change the Explain structure produces:

lucene.WildcardQuery, term=name:comp?ny*
digraph Automaton {
rankdir = LR
initial [shape=plaintext,label="0"]
initial -> 0
0 [shape=circle,label="0"]
0 -> 1 [label="c"]
1 [shape=circle,label="1"]
1 -> 3 [label="o"]
2 [shape=circle,label="2"]
2 -> 3 [label="o"]
3 [shape=circle,label="3"]
3 -> 5 [label="m"]
4 [shape=circle,label="4"]
4 -> 5 [label="m"]
5 [shape=circle,label="5"]
5 -> 7 [label="p"]
6 [shape=circle,label="6"]
6 -> 7 [label="p"]
7 [shape=circle,label="7"]
7 -> 9 [label="\U00000000-\U0010ffff"]
8 [shape=circle,label="8"]
8 -> 9 [label="\U00000000-\U0010ffff"]
9 [shape=circle,label="9"]
9 -> 11 [label="n"]
10 [shape=circle,label="10"]
10 -> 11 [label="n"]
11 [shape=circle,label="11"]
11 -> 13 [label="y"]
12 [shape=circle,label="12"]
12 -> 13 [label="y"]
13 [shape=doublecircle,label="13"]
13 -> 14 [label="\U00000000-\U0010ffff"]
14 [shape=doublecircle,label="14"]
14 -> 14 [label="\U00000000-\U0010ffff"]
}
0 INITIAL [reject], 1 transitions
0 --> 1 c-c
1 [reject], 1 transitions
1 --> 3 o-o
2 [reject], 1 transitions
2 --> 3 o-o
3 [reject], 1 transitions
3 --> 5 m-m
4 [reject], 1 transitions
4 --> 5 m-m
5 [reject], 1 transitions
5 --> 7 p-p
6 [reject], 1 transitions
6 --> 7 p-p
7 [reject], 1 transitions
7 --> 9 �-�
8 [reject], 1 transitions
8 --> 9 �-�
9 [reject], 1 transitions
9 --> 11 n-n
10 [reject], 1 transitions
10 --> 11 n-n
11 [reject], 1 transitions
11 --> 13 y-y
12 [reject], 1 transitions
12 --> 13 y-y
13 [accept], 1 transitions
13 --> 14 �-�
14 [accept], 1 transitions
14 --> 14 �-�

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant