TimeOutException performing search

7 views
Skip to first unread message

mubashir

unread,
Oct 1, 2010, 10:17:33 AM10/1/10
to lucandra-user
I added around one million documents in lucandra using following code:

Document doc = new Document();
doc.add(new Field("pringerId", pringerId, Store.YES,
Index.NOT_ANALYZED));
doc.add(new Field("menuId", menuId, Store.YES,
Index.NOT_ANALYZED));
doc.add(new Field("country", country, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("cityName", cityName, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("provinceName", provinceName, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("latitude", latitude, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("longitude", longitude, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("googleMapUrl", googleMapUrl, Store.NO,
Index.NOT_ANALYZED));
doc.add(new Field("address", address, Store.NO,
Index.ANALYZED));
doc.add(new Field("likes", likes, Store.NO, Index.ANALYZED));

indexWriter.addDocument(doc, analyzer);

but when I run any search on the data I am getting TimeOutException:

java.lang.RuntimeException: TimedOutException()
at lucandra.LucandraTermEnum.loadTerms(LucandraTermEnum.java:
232)
at lucandra.LucandraTermEnum.skipTo(LucandraTermEnum.java:88)
at lucandra.IndexReader.docFreq(IndexReader.java:149)
at
org.apache.lucene.search.IndexSearcher.docFreq(IndexSearcher.java:138)
at
org.apache.lucene.search.Similarity.idfExplain(Similarity.java:735)
at org.apache.lucene.search.TermQuery
$TermWeight.<init>(TermQuery.java:46)
at
org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:171)
at org.apache.lucene.search.Query.weight(Query.java:101)
at
org.apache.lucene.search.Searcher.createWeight(Searcher.java:147)
at org.apache.lucene.search.Searcher.search(Searcher.java:98)
at org.apache.lucene.search.Searcher.search(Searcher.java:108)
at
testlucandra.PringerPurchaseability.search(PringerPurchaseability.java:
126)
at
testlucandra.PringerPurchaseability.main(PringerPurchaseability.java:
151)

I also tried to perform search on a smaller set of data (around 10,000
documents) but this time I get ArrayIndexOutOfBoundException:

java.lang.ArrayIndexOutOfBoundsException: 1024
at lucandra.IndexReader.addDocument(IndexReader.java:448)
at
lucandra.LucandraTermEnum.getTermDocFreq(LucandraTermEnum.java:352)
at lucandra.LucandraTermDocs.seek(LucandraTermDocs.java:128)
at
org.apache.lucene.index.IndexReader.termDocs(IndexReader.java:814)
at org.apache.lucene.search.TermQuery
$TermWeight.scorer(TermQuery.java:74)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:210)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:170)
at org.apache.lucene.search.Searcher.search(Searcher.java:98)
at org.apache.lucene.search.Searcher.search(Searcher.java:108)
at
testlucandra.PringerPurchaseability.search(PringerPurchaseability.java:
126)
at
testlucandra.PringerPurchaseability.main(PringerPurchaseability.java:
151)

Can someone guide me whether I am doing something wrong or lucandra
wouldn't scale up for large records?

Krish Pan

unread,
Oct 1, 2010, 5:48:52 PM10/1/10
to lucand...@googlegroups.com
Can you confirm that you are using OrderPreservingPartitioner?, if not, you should use that to resolve error #2, 

mubashir

unread,
Oct 4, 2010, 2:37:30 AM10/4/10
to lucandra-user
I am using OrderPreservingPartitioner. Infact Initially I tried with
around hundred records and all searches were successfull and were
working as expected. Later I created indexes for 10 million records
and then performed search and I got TimeOutException on all searches
that were successfull with small data set. Then I recreated indexes
for around 10K records and performed same searches and this time
error#2 ArrayIndexOutOfBound exception started to appear.

On Oct 2, 2:48 am, Krish Pan <ceo.co...@gmail.com> wrote:
> Can you confirm that you are using OrderPreservingPartitioner?, if not, you
> should use that to resolve error #2,
>
Reply all
Reply to author
Forward
0 new messages