Re: Count rows with tokens

2011-09-15 Thread tom135
Facet Indexing is good solution for me :)

Thanks for your help!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Count-rows-with-tokens-tp3274643p3338556.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solandra - select query error

2011-09-15 Thread tom135
Hi Jake,

I was reproduce example of my error (commit release 3408a30):

1. I have used schema.xml from reuters-demo, with my fields definition:
.
fields
   field name=id type=long indexed=true stored=true required=true
/ 
   field name=text type=text indexed=true stored=true
termPositions=true/
   field name=doma_type type=long indexed=true stored=true
required=true /
   field name=sentiment_type type=long indexed=true stored=true
required=true /
   field name=date_check type=long indexed=true stored=true
required=true /
/fields
uniqueKeyid/uniqueKey
defaultSearchFieldtext/defaultSearchField
.

2. I have populated 1 items with two iterations (5000) to index
sampleIndex.sub

3. Then I execute many selects to above index sampleIndex.sub with many
combinations queries:
QueryResponse r = client.query(combination query);

- doma_type:(2) AND sentiment_type:(1) AND text:(piwo nie może) --
combination query - ERROR
- doma_type:(2 1) AND sentiment_type:(1) AND text:(piwo nie może)
- doma_type:(3 2 1) AND sentiment_type:(1) AND text:(piwo nie może)
- doma_type:(3 2 1) AND sentiment_type:(1) AND text:(może)
- doma_type:(3 2 1) AND sentiment_type:(1) AND text:(piwo nie)
- etc. (all combinations of numbers 1 2 3 and words piwo nie może)

4. In results, I have received error for a combination query (one from
above). The error combination query is not repeatable. This error does not
always occur. If error does not occur, then try above steps again (selects
should be performed immediately after index/write data).

I may have a bad configuration for this situation (I have standard
configuration).

MY CONSOLE ERROR:
org.apache.solr.client.solrj.SolrServerException: Error executing query
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
at com.its.bt.solandra.dao.PostDao.countPosts(PostDao.java:383)
at com.its.bt.solandra.dao.PostDao.countPostsByTokens(PostDao.java:338)
at com.its.bt.solandra.dao.ProjectDao.main(ProjectDao.java:42)
Caused by: org.apache.solr.common.SolrException: 4 
java.lang.ArrayIndexOutOfBoundsException: 4 at
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:310)  at
org.apache.lucene.search.ConjunctionScorer.score(ConjunctionScorer.java:135) 
at org.apache.lucene.search.BooleanScorer2$2.score(BooleanScorer2.java:182) 
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:309) 
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
 
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:281) 
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:320)   at
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1178)
 
at
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1066)
 
at
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:358) 
at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:258)
 
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
 
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
 
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368)at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356) 
at solandra.SolandraDispatchFilter.execute(SolandraDispatchFilter.java:171) 
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
 
at solandra.SolandraDispatchFilter.doFilter(SolandraDispatchFilter.java:137) 
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
 
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) 
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) 
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) 
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) 
at org.mortbay.jetty.Server.handle(Server.ja

4  java.lang.ArrayIndexOutOfBoundsException: 4  at
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:310)  at
org.apache.lucene.search.ConjunctionScorer.score(ConjunctionScorer.java:135) 
at org.apache.lucene.search.BooleanScorer2$2.score(BooleanScorer2.java:182) 
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:309) 
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
 
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:281) 
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:526)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:320)   at

Solandra - select query error

2011-09-12 Thread tom135
Hello,

I have some index and two search query:
1. http://127.0.0.1:8983/solandra/INDEX_NAME/select?q=type:(3 2 1) AND
category:(2 1) AND text:(WORD1 WORD2 WORD3 WORD4
WORD5)facet.field=creation_datefacet=truewt=javabinversion=2

This query works good

2. 1. http://127.0.0.1:8983/solandra/INDEX_NAME/select?q=type:(2 1) AND
category:(2 1) AND text:(WORD1 WORD2 WORD3 WORD4
WORD5)facet.field=creation_datefacet=truewt=javabinversion=2

This select throw an error:
*===*
*HTTP ERROR 500*

Problem accessing /solandra/INDEX_NAME.proj1/select. Reason:

null  java.lang.ArrayIndexOutOfBoundsException

null  java.lang.ArrayIndexOutOfBoundsException

request: http://127.0.0.1:8983/solandra/INDEX_NAME.proj1~3/select

org.apache.solr.common.SolrException: null 
java.lang.ArrayIndexOutOfBoundsException

null  java.lang.ArrayIndexOutOfBoundsException

request: http://127.0.0.1:8983/solandra/INDEX_NAME.proj1~3/select
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
at
org.apache.solr.handler.component.HttpCommComponent$1.call(SearchHandler.java:421)
at
org.apache.solr.handler.component.HttpCommComponent$1.call(SearchHandler.java:393)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
*===*

Thanks for any help!


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solandra-select-query-error-tp3329423p3329423.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solandra - select query error

2011-09-12 Thread tom135
It's complecated to give you sample data. But this error depends on the size
of data. I have indexed 200 docs and this error did not occurred. But I need
much more (ie. 5 000 000), so if I try to index 2000 docs then come this
error.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solandra-select-query-error-tp3329423p3329613.html
Sent from the Solr - User mailing list archive at Nabble.com.


Count rows with tokens

2011-08-22 Thread tom135
Hello,

I want to use Solr as a search engine. I have indexed data like:
ID | TEXT | CREATION_DATE

Daily increase by 500 000 rows.

My problem:
*INPUT:* fixed set of tokens (max size 40), set of days
*RESULT:* How many rows (TEXT) contain fixed set of tokens and are created
in day1, day2, ..., day20

I tried to build aggregates like:
*1. Solution*
DATE (days) | TOKEN_1 | TOKEN_2 | ... | TOKEN_40

where for example:
TOKEN_3 - string like ID_1,ID_2,...,ID_N, where ID_* contain the TOKEN_3

then I can split TOKEN_* to SetLong and size of SetLong is the number of
distinct rows.
*PROBLEM:* But here is the problem with sending to long strings that must be
splitted by the client side (to big response data).

*2. Solution*
DATE (days) | TOKENS | COUNT

where 
TOKENS contains combination of input tokens.
For 3 tokens I have 7 combinations
For 5 tokens I have 31 combinations
For 10 tokens I have 1023 combinations
For 20 tokens I have 1048575 combinations
etc.
*PROBLEM:* To many cases (combinations) with 40 tokens

Maybe the 1 Solution would be good if I could split the strings by some Solr
function (custom function) or...?

Thanks for any ideas





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Count-rows-with-tokens-tp3274643p3274643.html
Sent from the Solr - User mailing list archive at Nabble.com.