Hi all, 
I am planing to migrate from Lucene 3.5 to Lucene 4.0. But my query does not
work in 4.0.

For example, when I run the following code,

        public static void main(String[] args) {
                new WildcardQuery(new Term("id", "????????????????????1*"));
        }

I encounted OutOfMemoryError: (even if raise Heap Size up to 1GB)

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at
org.apache.lucene.util.automaton.BasicOperations.determinize(BasicOperations.java:656)
        at
org.apache.lucene.util.automaton.Automaton.determinize(Automaton.java:758)
        at
org.apache.lucene.util.automaton.SpecialOperations.getCommonSuffixBytesRef(SpecialOperations.java:163)
        at
org.apache.lucene.util.automaton.CompiledAutomaton.<init>(CompiledAutomaton.java:167)
        at
org.apache.lucene.util.automaton.CompiledAutomaton.<init>(CompiledAutomaton.java:90)
        at 
org.apache.lucene.search.AutomatonQuery.<init>(AutomatonQuery.java:68)
        at org.apache.lucene.search.WildcardQuery.<init>(WildcardQuery.java:57)

In 3.5, I didn't see this error.

I also see simirality error in RegexpQuery with the following code.

        public static void main(String[] args) {
                new RegexpQuery(new Term("id", ".{20}1.*"));
        }
        
        If execute this code, OutOfMemoryError occuered:
        
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.TreeMap.put(TreeMap.java:569)
        at 
org.apache.lucene.util.automaton.SortedIntSet.incr(SortedIntSet.java:55)
        at
org.apache.lucene.util.automaton.BasicOperations.determinize(BasicOperations.java:691)
        at
org.apache.lucene.util.automaton.Automaton.determinize(Automaton.java:758)
        at
org.apache.lucene.util.automaton.SpecialOperations.getCommonSuffixBytesRef(SpecialOperations.java:163)
        at
org.apache.lucene.util.automaton.CompiledAutomaton.<init>(CompiledAutomaton.java:167)
        at
org.apache.lucene.util.automaton.CompiledAutomaton.<init>(CompiledAutomaton.java:90)
        at 
org.apache.lucene.search.AutomatonQuery.<init>(AutomatonQuery.java:68)
        at org.apache.lucene.search.RegexpQuery.<init>(RegexpQuery.java:89)
        at org.apache.lucene.search.RegexpQuery.<init>(RegexpQuery.java:78)
        at org.apache.lucene.search.RegexpQuery.<init>(RegexpQuery.java:68)

Does anyone have a same problem? Any advice is appreciated.

Thanks,
Kou Mizutani



--
View this message in context: 
http://lucene.472066.n3.nabble.com/OutOfMemoryError-occured-by-WildcardQuery-tp4051924.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to