Re: CollapseFilter with the latest Solr in trunk

2009-04-20 Thread Jeff Newburn
What are the current issues holding this back?  Seems to be working with
some minor bug fixes.
-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562


 From: Otis Gospodnetic otis_gospodne...@yahoo.com
 Reply-To: solr-user@lucene.apache.org
 Date: Sun, 19 Apr 2009 20:30:22 -0700 (PDT)
 To: solr-user@lucene.apache.org
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 
 Once somebody really makes it work, I'm sure it will be released!
 
 
 Otis
 --
 Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
 
 
 
 - Original Message 
 From: Antonio Eggberg antonio_eggb...@yahoo.se
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 9:21:20 PM
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 
 I wish it would be planned for 1.4 :))
 
 
 --- Den sön 2009-04-19 skrev Otis Gospodnetic :
 
 Från: Otis Gospodnetic
 Ämne: Re: CollapseFilter with the latest Solr in trunk
 Till: solr-user@lucene.apache.org
 Datum: söndag 19 april 2009 15.06
 
 Thanks for sharing!
 It would be good if you (of Jeff from Zappos or anyone
 making changes to this) could put up a new patch for this
 most-voted-JIRA-issue.
 
 
 Thanks,
 Otis --
 Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
 
 
 
 - Original Message 
 From: climbingrose
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 8:12:11 AM
 Subject: Re: CollapseFilter with the latest Solr in
 trunk
 
 Ok, here is how I fixed this problem:
 
   public DocListAndSet
 getDocListAndSet(Query query, ListfilterList,
 DocSet docSet, Sort lsort, int offset, int len, int
 flags) throwsIOException {
 
 //DocListAndSet ret = new
 DocListAndSet();
 
 
//getDocListC(ret,query,filterList,docSet,lsort,offset,len,
 flags |=
 GET_DOCSET);
 
 DocSet theFilt = getDocSet(filterList);
 
 if (docSet != null) theFilt = (theFilt != null) ?
 theFilt.intersection(docSet) : docSet;
 
 QueryCommand qc = new
 QueryCommand();
 
 
qc.setQuery(query).setFilter(theFilt);
 
 
qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags
 |=
 GET_DOCSET);
 
 QueryResult result = new
 QueryResult();
 
 getDocListC(result,qc);
 
 
 
 return
 result.getDocListAndSet();
 
   }
 
 
 There is also one-off error in CollapseFilter which
 you can find solution on
 Jira.
 
 Cheers,
 Cuong
 
 On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn wrote:
 
 We are currently trying to do the same
 thing.  With the patch unaltered we
 can use fq as long as collapsing is turned
 on.  If we just send a normal
 document level query with an fq parameter it
 blows up.
 
 Additionally, it does not appear that the
 collapse.facet option works at
 all.
 
 --
 Jeff Newburn
 Software Engineer, Zappos.com
 jnewb...@zappos.com
 - 702-943-7562
 
 
 From: climbingrose
 Reply-To: 
 Date: Fri, 17 Apr 2009 16:53:00 +1000
 To: solr-user
 Subject: CollapseFilter with the latest Solr
 in trunk
 
 Hi all,
 
 Have any one try to use CollapseFilter with
 the latest version of Solr in
 trunk? However, it looks like Solr 1.4
 doesn't allow calling
 setFilterList()
 and setFilter() on one instance of the
 QueryCommand. I modified the code
 in
 QueryCommand to allow this:
 
 public QueryCommand
 setFilterList(Query f) {
 //  if( filter != null )
 {
 //throw new
 IllegalArgumentException( Either filter or
 filterList
 may be set in the QueryCommand, but not
 both. );
 //  }
   filterList =
 null;
   if (f !=
 null) {
 
filterList = new ArrayList(2);
 
filterList.add(f);
   }
   return this;
 }
 
 However, I still have a problem which
 prevent query filters from working
 when used in conjunction with
 CollapseFilter. In other words, query
 filters
 doesn't seem to have any effects on the
 result set when CollapseFilter is
 used.
 
 The other problem is related to OpenBitSet:
 
 java.lang.ArrayIndexOutOfBoundsException:
 2183
 at
 org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
 at
 org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)
 
 at
 
 
 
 
 
 org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:16
 1
 )
 at
 
 org.apache.solr.search.CollapseFilter.(CollapseFilter.java:141)
 
 at
 
 
 org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java
 :2
 17)
 at
 
 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHand
 le
 r.java:195)
 at
 
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.
 ja
 va:131)
 
 at
 org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
 at
 
 
 
 
 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:30
 3
 )
 at
 
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:
 23
 2)
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
 Fi
 lterChain.java:202)
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
 ai

Re: CollapseFilter with the latest Solr in trunk

2009-04-20 Thread Ryan McKinley
I have not looked at this in a while, but I think the biggest thing it  
is missing right now is a champion -- someone to get the patches (and  
bug fixes) to a state where it can easily be committed.  Minor bug  
fixes are road blocks to getting things integrated.


ryan


On Apr 20, 2009, at 10:16 AM, Jeff Newburn wrote:

What are the current issues holding this back?  Seems to be working  
with

some minor bug fixes.
--
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562



From: Otis Gospodnetic otis_gospodne...@yahoo.com
Reply-To: solr-user@lucene.apache.org
Date: Sun, 19 Apr 2009 20:30:22 -0700 (PDT)
To: solr-user@lucene.apache.org
Subject: Re: CollapseFilter with the latest Solr in trunk


Once somebody really makes it work, I'm sure it will be released!


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 

From: Antonio Eggberg antonio_eggb...@yahoo.se
To: solr-user@lucene.apache.org
Sent: Sunday, April 19, 2009 9:21:20 PM
Subject: Re: CollapseFilter with the latest Solr in trunk


I wish it would be planned for 1.4 :))


--- Den sön 2009-04-19 skrev Otis Gospodnetic :


Från: Otis Gospodnetic
Ämne: Re: CollapseFilter with the latest Solr in trunk
Till: solr-user@lucene.apache.org
Datum: söndag 19 april 2009 15.06

Thanks for sharing!
It would be good if you (of Jeff from Zappos or anyone
making changes to this) could put up a new patch for this
most-voted-JIRA-issue.


Thanks,
Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 

From: climbingrose
To: solr-user@lucene.apache.org
Sent: Sunday, April 19, 2009 8:12:11 AM
Subject: Re: CollapseFilter with the latest Solr in

trunk


Ok, here is how I fixed this problem:

 public DocListAndSet

getDocListAndSet(Query query, ListfilterList,

DocSet docSet, Sort lsort, int offset, int len, int

flags) throwsIOException {


   //DocListAndSet ret = new

DocListAndSet();




  //getDocListC(ret,query,filterList,docSet,lsort,offset,len,
flags |=

GET_DOCSET);

DocSet theFilt = getDocSet(filterList);

if (docSet != null) theFilt = (theFilt != null) ?
theFilt.intersection(docSet) : docSet;

   QueryCommand qc = new

QueryCommand();




  qc.setQuery(query).setFilter(theFilt);




  qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags
|=

GET_DOCSET);

   QueryResult result = new

QueryResult();


   getDocListC(result,qc);



   return

result.getDocListAndSet();


 }


There is also one-off error in CollapseFilter which

you can find solution on

Jira.

Cheers,
Cuong

On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn wrote:


We are currently trying to do the same

thing.  With the patch unaltered we

can use fq as long as collapsing is turned

on.  If we just send a normal

document level query with an fq parameter it

blows up.


Additionally, it does not appear that the

collapse.facet option works at

all.

--
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com

- 702-943-7562




From: climbingrose
Reply-To:
Date: Fri, 17 Apr 2009 16:53:00 +1000
To: solr-user
Subject: CollapseFilter with the latest Solr

in trunk


Hi all,

Have any one try to use CollapseFilter with

the latest version of Solr in

trunk? However, it looks like Solr 1.4

doesn't allow calling

setFilterList()

and setFilter() on one instance of the

QueryCommand. I modified the code

in

QueryCommand to allow this:

   public QueryCommand

setFilterList(Query f) {

//  if( filter != null )

{

//throw new

IllegalArgumentException( Either filter or

filterList

may be set in the QueryCommand, but not

both. );

//  }
 filterList =

null;

 if (f !=

null) {



  filterList = new ArrayList(2);



  filterList.add(f);

 }
 return this;
   }

However, I still have a problem which

prevent query filters from working

when used in conjunction with

CollapseFilter. In other words, query

filters

doesn't seem to have any effects on the

result set when CollapseFilter is

used.

The other problem is related to OpenBitSet:

java.lang.ArrayIndexOutOfBoundsException:

2183

at

org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)

at
org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java: 
202)


at








org 
.apache 
.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:16

1

)

at



org.apache.solr.search.CollapseFilter.(CollapseFilter.java:141)


at



org 
.apache 
.solr.handler.component.QueryComponent.process(QueryComponent.java

:2

17)
at



org 
.apache 
.solr.handler.component.SearchHandler.handleRequestBody(SearchHand

le

r.java:195)
at



org 
.apache 
.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.

ja

va:131)

at

org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)

at








org 
.apache 
.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:30

3

)

at



org 
.apache 
.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:

23

2

Re: CollapseFilter with the latest Solr in trunk

2009-04-20 Thread Jeff Newburn
We would love to help debug the issues but we have limited knowledge in the
source code.  I have looked through the patch information but I am not
understanding the interactions of where the component should be.

The example of this is our struggle with the collapse.facet.  It does not
appear to do anything.  We have walked through the component with no success
in trying to find where it alters the facets or tells the system to change
the counts.  We have also moved the collapse component from last to first
just to see what it is doing.  Pointing us in a direction of how this works
would help us more closely understand what the components are doing to each
other.

requestHandler name=dismax class=solr.DisMaxRequestHandler
default=true 
lst name=defaults
str name=echoParamsexplicit/str
float name=tie0.01/float
str name=qf
productId^10.0

personality^15.0
subCategory^20.0
category^10.0
productType^8.0

brandName^10.0
realBrandName^9.5
productNameSearch^20

size^1.2
width^1.0
heelHeight^1.0

productDescription^5.0
color^6.0
price^1.0

expandedGender^0.5
/str
str name=pf
brandName^5.0  productNameSearch^5.0 productDescription^5.0
personality^10.0 subCategory^20.0 category^10.0 productType^8.0
/str
str name=fl
productId, productName, price, originalPrice,
brandNameFacet, productRating, imageUrl, productUrl, isNew, onSale
/str
str name=bfrord(popularity)^1/str
str name=mm100%/str
int name=ps1/int
int name=qs5/int
str name=q.alt*:*/str

!-- More like this search parameters --
str 
name=mlt.flbrandNameFacet,productTypeFacet,productName,categoryFacet,subC
ategoryFacet,personalityFacet,colorFacet,heelHeight,expandedGender/str
int name=mlt.mindf1/int
int name=mlt.mintf1/int
/lst
 arr name=last-components
strcollapse/str
   strspellcheck/str
 /arr

/requestHandler





-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562


 From: Ryan McKinley ryan...@gmail.com
 Reply-To: solr-user@lucene.apache.org
 Date: Mon, 20 Apr 2009 10:48:19 -0400
 To: solr-user@lucene.apache.org
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 I have not looked at this in a while, but I think the biggest thing it
 is missing right now is a champion -- someone to get the patches (and
 bug fixes) to a state where it can easily be committed.  Minor bug
 fixes are road blocks to getting things integrated.
 
 ryan
 
 
 On Apr 20, 2009, at 10:16 AM, Jeff Newburn wrote:
 
 What are the current issues holding this back?  Seems to be working
 with
 some minor bug fixes.
 -- 
 Jeff Newburn
 Software Engineer, Zappos.com
 jnewb...@zappos.com - 702-943-7562
 
 
 From: Otis Gospodnetic otis_gospodne...@yahoo.com
 Reply-To: solr-user@lucene.apache.org
 Date: Sun, 19 Apr 2009 20:30:22 -0700 (PDT)
 To: solr-user@lucene.apache.org
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 
 Once somebody really makes it work, I'm sure it will be released!
 
 
 Otis
 --
 Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
 
 
 
 - Original Message 
 From: Antonio Eggberg antonio_eggb...@yahoo.se
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 9:21:20 PM
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 
 I wish it would be planned for 1.4 :))
 
 
 --- Den sön 2009-04-19 skrev Otis Gospodnetic :
 
 Från: Otis Gospodnetic
 Ämne: Re: CollapseFilter with the latest Solr in trunk
 Till: solr-user@lucene.apache.org
 Datum: söndag 19 april 2009 15.06
 
 Thanks for sharing!
 It would be good if you (of Jeff from Zappos or anyone
 making changes to this) could put up a new patch for this
 most-voted-JIRA-issue.
 
 
 Thanks,
 Otis --
 Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
 
 
 
 - Original Message 
 From: climbingrose
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 8:12:11 AM
 Subject: Re: CollapseFilter with the latest Solr in
 trunk
 
 Ok, here is how I fixed this problem:
 
  public DocListAndSet
 getDocListAndSet(Query query, ListfilterList,
 DocSet docSet, Sort lsort, int offset, int len, int
 flags) throwsIOException {
 
//DocListAndSet ret = new
 DocListAndSet();
 
 
   //getDocListC(ret,query,filterList,docSet,lsort,offset,len,
 flags |=
 GET_DOCSET);
 
 DocSet theFilt = getDocSet(filterList);
 
 if (docSet != null) theFilt = (theFilt != null) ?
 theFilt.intersection(docSet) : docSet;
 
QueryCommand qc = new
 QueryCommand();
 
 
   qc.setQuery(query).setFilter(theFilt);
 
 
   qc.setSort(lsort

Re: CollapseFilter with the latest Solr in trunk

2009-04-19 Thread climbingrose
Ok, here is how I fixed this problem:

  public DocListAndSet getDocListAndSet(Query query, ListQuery filterList,
DocSet docSet, Sort lsort, int offset, int len, int flags) throwsIOException {

//DocListAndSet ret = new DocListAndSet();

//getDocListC(ret,query,filterList,docSet,lsort,offset,len, flags |=
GET_DOCSET);

DocSet theFilt = getDocSet(filterList);

if (docSet != null) theFilt = (theFilt != null) ?
theFilt.intersection(docSet) : docSet;

QueryCommand qc = new QueryCommand();

qc.setQuery(query).setFilter(theFilt);

qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags |=
GET_DOCSET);

QueryResult result = new QueryResult();

getDocListC(result,qc);



return result.getDocListAndSet();

  }


There is also one-off error in CollapseFilter which you can find solution on
Jira.

Cheers,
Cuong

On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn jnewb...@zappos.com wrote:

 We are currently trying to do the same thing.  With the patch unaltered we
 can use fq as long as collapsing is turned on.  If we just send a normal
 document level query with an fq parameter it blows up.

 Additionally, it does not appear that the collapse.facet option works at
 all.

 --
 Jeff Newburn
 Software Engineer, Zappos.com
 jnewb...@zappos.com - 702-943-7562


  From: climbingrose climbingr...@gmail.com
  Reply-To: solr-user@lucene.apache.org
  Date: Fri, 17 Apr 2009 16:53:00 +1000
  To: solr-user solr-user@lucene.apache.org
  Subject: CollapseFilter with the latest Solr in trunk
 
  Hi all,
 
  Have any one try to use CollapseFilter with the latest version of Solr in
  trunk? However, it looks like Solr 1.4 doesn't allow calling
 setFilterList()
  and setFilter() on one instance of the QueryCommand. I modified the code
 in
  QueryCommand to allow this:
 
  public QueryCommand setFilterList(Query f) {
  //  if( filter != null ) {
  //throw new IllegalArgumentException( Either filter or
 filterList
  may be set in the QueryCommand, but not both. );
  //  }
filterList = null;
if (f != null) {
  filterList = new ArrayListQuery(2);
  filterList.add(f);
}
return this;
  }
 
  However, I still have a problem which prevent query filters from working
  when used in conjunction with CollapseFilter. In other words, query
 filters
  doesn't seem to have any effects on the result set when CollapseFilter is
  used.
 
  The other problem is related to OpenBitSet:
 
  java.lang.ArrayIndexOutOfBoundsException: 2183
  at org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
  at org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)
 
  at
 

 org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:161
 )
  at
 org.apache.solr.search.CollapseFilter.lt;initgt;(CollapseFilter.java:141)
 
  at
 
 org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:2
  17)
  at
 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
  r.java:195)
  at
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
  va:131)
 
  at org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
  at
 

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303
 )
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:23
  2)
 
  at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
  lterChain.java:202)
  at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
  n.java:173)
  at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
  :213)
 
  at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
  :178)
  at
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  at
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 
  at
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:1
  07)
  at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 
  at
 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processCon
  nection(Http11BaseProtocol.java:664)
  at
 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
  527)
  at
 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWork
  erThread.java:80)
 
  at
 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:
  684)
 
 
  at java.lang.Thread.run(Thread.java:619)
 
  I think CollapseFilter is rather an important function in Solr that gets
  used quite frequently. Does anyone have a solution for this?
 
  --
  Regards,
 
  Cuong Hoang




-- 
Regards,

Cuong Hoang


Re: CollapseFilter with the latest Solr in trunk

2009-04-19 Thread Otis Gospodnetic

Thanks for sharing!
It would be good if you (of Jeff from Zappos or anyone making changes to this) 
could put up a new patch for this most-voted-JIRA-issue.


Thanks,
Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
 From: climbingrose climbingr...@gmail.com
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 8:12:11 AM
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 Ok, here is how I fixed this problem:
 
   public DocListAndSet getDocListAndSet(Query query, ListfilterList,
 DocSet docSet, Sort lsort, int offset, int len, int flags) throwsIOException {
 
 //DocListAndSet ret = new DocListAndSet();
 
 //getDocListC(ret,query,filterList,docSet,lsort,offset,len, flags |=
 GET_DOCSET);
 
 DocSet theFilt = getDocSet(filterList);
 
 if (docSet != null) theFilt = (theFilt != null) ?
 theFilt.intersection(docSet) : docSet;
 
 QueryCommand qc = new QueryCommand();
 
 qc.setQuery(query).setFilter(theFilt);
 
 qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags |=
 GET_DOCSET);
 
 QueryResult result = new QueryResult();
 
 getDocListC(result,qc);
 
 
 
 return result.getDocListAndSet();
 
   }
 
 
 There is also one-off error in CollapseFilter which you can find solution on
 Jira.
 
 Cheers,
 Cuong
 
 On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn wrote:
 
  We are currently trying to do the same thing.  With the patch unaltered we
  can use fq as long as collapsing is turned on.  If we just send a normal
  document level query with an fq parameter it blows up.
 
  Additionally, it does not appear that the collapse.facet option works at
  all.
 
  --
  Jeff Newburn
  Software Engineer, Zappos.com
  jnewb...@zappos.com - 702-943-7562
 
 
   From: climbingrose 
   Reply-To: 
   Date: Fri, 17 Apr 2009 16:53:00 +1000
   To: solr-user 
   Subject: CollapseFilter with the latest Solr in trunk
  
   Hi all,
  
   Have any one try to use CollapseFilter with the latest version of Solr in
   trunk? However, it looks like Solr 1.4 doesn't allow calling
  setFilterList()
   and setFilter() on one instance of the QueryCommand. I modified the code
  in
   QueryCommand to allow this:
  
   public QueryCommand setFilterList(Query f) {
   //  if( filter != null ) {
   //throw new IllegalArgumentException( Either filter or
  filterList
   may be set in the QueryCommand, but not both. );
   //  }
 filterList = null;
 if (f != null) {
   filterList = new ArrayList(2);
   filterList.add(f);
 }
 return this;
   }
  
   However, I still have a problem which prevent query filters from working
   when used in conjunction with CollapseFilter. In other words, query
  filters
   doesn't seem to have any effects on the result set when CollapseFilter is
   used.
  
   The other problem is related to OpenBitSet:
  
   java.lang.ArrayIndexOutOfBoundsException: 2183
   at org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
   at org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)
  
   at
  
 
  
 org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:161
  )
   at
  org.apache.solr.search.CollapseFilter.init(CollapseFilter.java:141)
  
   at
  
  org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:2
   17)
   at
  
  org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
   r.java:195)
   at
  
  org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
   va:131)
  
   at org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
   at
  
 
  
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303
  )
   at
  
  org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:23
   2)
  
   at
  
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
   lterChain.java:202)
   at
  
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
   n.java:173)
   at
  
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
   :213)
  
   at
  
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
   :178)
   at
  
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at
  
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  
   at
  
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:1
   07)
   at
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  
   at
  
  org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processCon
   nection(Http11BaseProtocol.java:664)
   at
  
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
   527

Re: CollapseFilter with the latest Solr in trunk

2009-04-19 Thread Antonio Eggberg

I wish it would be planned for 1.4 :)) 


--- Den sön 2009-04-19 skrev Otis Gospodnetic otis_gospodne...@yahoo.com:

 Från: Otis Gospodnetic otis_gospodne...@yahoo.com
 Ämne: Re: CollapseFilter with the latest Solr in trunk
 Till: solr-user@lucene.apache.org
 Datum: söndag 19 april 2009 15.06
 
 Thanks for sharing!
 It would be good if you (of Jeff from Zappos or anyone
 making changes to this) could put up a new patch for this
 most-voted-JIRA-issue.
 
 
 Thanks,
 Otis --
 Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
 
 
 
 - Original Message 
  From: climbingrose climbingr...@gmail.com
  To: solr-user@lucene.apache.org
  Sent: Sunday, April 19, 2009 8:12:11 AM
  Subject: Re: CollapseFilter with the latest Solr in
 trunk
  
  Ok, here is how I fixed this problem:
  
    public DocListAndSet
 getDocListAndSet(Query query, ListfilterList,
  DocSet docSet, Sort lsort, int offset, int len, int
 flags) throwsIOException {
  
      //DocListAndSet ret = new
 DocListAndSet();
  
  
    //getDocListC(ret,query,filterList,docSet,lsort,offset,len,
 flags |=
  GET_DOCSET);
  
  DocSet theFilt = getDocSet(filterList);
  
  if (docSet != null) theFilt = (theFilt != null) ?
  theFilt.intersection(docSet) : docSet;
  
      QueryCommand qc = new
 QueryCommand();
  
  
    qc.setQuery(query).setFilter(theFilt);
  
  
    qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags
 |=
  GET_DOCSET);
  
      QueryResult result = new
 QueryResult();
  
      getDocListC(result,qc);
  
  
  
      return
 result.getDocListAndSet();
  
    }
  
  
  There is also one-off error in CollapseFilter which
 you can find solution on
  Jira.
  
  Cheers,
  Cuong
  
  On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn wrote:
  
   We are currently trying to do the same
 thing.  With the patch unaltered we
   can use fq as long as collapsing is turned
 on.  If we just send a normal
   document level query with an fq parameter it
 blows up.
  
   Additionally, it does not appear that the
 collapse.facet option works at
   all.
  
   --
   Jeff Newburn
   Software Engineer, Zappos.com
   jnewb...@zappos.com
 - 702-943-7562
  
  
From: climbingrose 
Reply-To: 
Date: Fri, 17 Apr 2009 16:53:00 +1000
To: solr-user 
Subject: CollapseFilter with the latest Solr
 in trunk
   
Hi all,
   
Have any one try to use CollapseFilter with
 the latest version of Solr in
trunk? However, it looks like Solr 1.4
 doesn't allow calling
   setFilterList()
and setFilter() on one instance of the
 QueryCommand. I modified the code
   in
QueryCommand to allow this:
   
        public QueryCommand
 setFilterList(Query f) {
//      if( filter != null )
 {
//        throw new
 IllegalArgumentException( Either filter or
   filterList
may be set in the QueryCommand, but not
 both. );
//      }
          filterList =
 null;
          if (f !=
 null) {
        
    filterList = new ArrayList(2);
        
    filterList.add(f);
          }
          return this;
        }
   
However, I still have a problem which
 prevent query filters from working
when used in conjunction with
 CollapseFilter. In other words, query
   filters
doesn't seem to have any effects on the
 result set when CollapseFilter is
used.
   
The other problem is related to OpenBitSet:
   
java.lang.ArrayIndexOutOfBoundsException:
 2183
at
 org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
at
 org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)
   
at
   
  
   
 
 org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:161
   )
at
  
 org.apache.solr.search.CollapseFilter.init(CollapseFilter.java:141)
   
at
   
  
 org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:2
17)
at
   
  
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
r.java:195)
at
   
  
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
va:131)
   
at
 org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
at
   
  
   
 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303
   )
at
   
  
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:23
2)
   
at
   
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
lterChain.java:202)
at
   
  
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
n.java:173)
at
   
  
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
:213)
   
at
   
  
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
:178)
at
   
  
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
   
  
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105

Re: CollapseFilter with the latest Solr in trunk

2009-04-19 Thread Otis Gospodnetic

Once somebody really makes it work, I'm sure it will be released!


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



- Original Message 
 From: Antonio Eggberg antonio_eggb...@yahoo.se
 To: solr-user@lucene.apache.org
 Sent: Sunday, April 19, 2009 9:21:20 PM
 Subject: Re: CollapseFilter with the latest Solr in trunk
 
 
 I wish it would be planned for 1.4 :)) 
 
 
 --- Den sön 2009-04-19 skrev Otis Gospodnetic :
 
  Från: Otis Gospodnetic 
  Ämne: Re: CollapseFilter with the latest Solr in trunk
  Till: solr-user@lucene.apache.org
  Datum: söndag 19 april 2009 15.06
  
  Thanks for sharing!
  It would be good if you (of Jeff from Zappos or anyone
  making changes to this) could put up a new patch for this
  most-voted-JIRA-issue.
  
  
  Thanks,
  Otis --
  Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
  
  
  
  - Original Message 
   From: climbingrose 
   To: solr-user@lucene.apache.org
   Sent: Sunday, April 19, 2009 8:12:11 AM
   Subject: Re: CollapseFilter with the latest Solr in
  trunk
   
   Ok, here is how I fixed this problem:
   
 public DocListAndSet
  getDocListAndSet(Query query, ListfilterList,
   DocSet docSet, Sort lsort, int offset, int len, int
  flags) throwsIOException {
   
   //DocListAndSet ret = new
  DocListAndSet();
   
   
 //getDocListC(ret,query,filterList,docSet,lsort,offset,len,
  flags |=
   GET_DOCSET);
   
   DocSet theFilt = getDocSet(filterList);
   
   if (docSet != null) theFilt = (theFilt != null) ?
   theFilt.intersection(docSet) : docSet;
   
   QueryCommand qc = new
  QueryCommand();
   
   
 qc.setQuery(query).setFilter(theFilt);
   
   
 qc.setSort(lsort).setOffset(offset).setLen(len).setFlags(flags
  |=
   GET_DOCSET);
   
   QueryResult result = new
  QueryResult();
   
   getDocListC(result,qc);
   
   
   
   return
  result.getDocListAndSet();
   
 }
   
   
   There is also one-off error in CollapseFilter which
  you can find solution on
   Jira.
   
   Cheers,
   Cuong
   
   On Sat, Apr 18, 2009 at 4:41 AM, Jeff Newburn wrote:
   
We are currently trying to do the same
  thing.  With the patch unaltered we
can use fq as long as collapsing is turned
  on.  If we just send a normal
document level query with an fq parameter it
  blows up.
   
Additionally, it does not appear that the
  collapse.facet option works at
all.
   
--
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com
  - 702-943-7562
   
   
 From: climbingrose 
 Reply-To: 
 Date: Fri, 17 Apr 2009 16:53:00 +1000
 To: solr-user 
 Subject: CollapseFilter with the latest Solr
  in trunk

 Hi all,

 Have any one try to use CollapseFilter with
  the latest version of Solr in
 trunk? However, it looks like Solr 1.4
  doesn't allow calling
setFilterList()
 and setFilter() on one instance of the
  QueryCommand. I modified the code
in
 QueryCommand to allow this:

 public QueryCommand
  setFilterList(Query f) {
 //  if( filter != null )
  {
 //throw new
  IllegalArgumentException( Either filter or
filterList
 may be set in the QueryCommand, but not
  both. );
 //  }
   filterList =
  null;
   if (f !=
  null) {
 
 filterList = new ArrayList(2);
 
 filterList.add(f);
   }
   return this;
 }

 However, I still have a problem which
  prevent query filters from working
 when used in conjunction with
  CollapseFilter. In other words, query
filters
 doesn't seem to have any effects on the
  result set when CollapseFilter is
 used.

 The other problem is related to OpenBitSet:

 java.lang.ArrayIndexOutOfBoundsException:
  2183
 at
  org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
 at
  org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)

 at

   

  
  
 org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:161
)
 at
   
  org.apache.solr.search.CollapseFilter.(CollapseFilter.java:141)

 at

   
  org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:2
 17)
 at

   
  org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
 r.java:195)
 at

   
  org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
 va:131)

 at
  org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
 at

   

  
  
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303
)
 at

   
  org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:23
 2)

 at

   
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
 lterChain.java:202

Re: CollapseFilter with the latest Solr in trunk

2009-04-17 Thread Jeff Newburn
We are currently trying to do the same thing.  With the patch unaltered we
can use fq as long as collapsing is turned on.  If we just send a normal
document level query with an fq parameter it blows up.

Additionally, it does not appear that the collapse.facet option works at
all.

-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562


 From: climbingrose climbingr...@gmail.com
 Reply-To: solr-user@lucene.apache.org
 Date: Fri, 17 Apr 2009 16:53:00 +1000
 To: solr-user solr-user@lucene.apache.org
 Subject: CollapseFilter with the latest Solr in trunk
 
 Hi all,
 
 Have any one try to use CollapseFilter with the latest version of Solr in
 trunk? However, it looks like Solr 1.4 doesn't allow calling setFilterList()
 and setFilter() on one instance of the QueryCommand. I modified the code in
 QueryCommand to allow this:
 
 public QueryCommand setFilterList(Query f) {
 //  if( filter != null ) {
 //throw new IllegalArgumentException( Either filter or filterList
 may be set in the QueryCommand, but not both. );
 //  }
   filterList = null;
   if (f != null) {
 filterList = new ArrayListQuery(2);
 filterList.add(f);
   }
   return this;
 }
 
 However, I still have a problem which prevent query filters from working
 when used in conjunction with CollapseFilter. In other words, query filters
 doesn't seem to have any effects on the result set when CollapseFilter is
 used.
 
 The other problem is related to OpenBitSet:
 
 java.lang.ArrayIndexOutOfBoundsException: 2183
 at org.apache.lucene.util.OpenBitSet.fastSet(OpenBitSet.java:242)
 at org.apache.solr.search.CollapseFilter.addDoc(CollapseFilter.java:202)
 
 at 
 
org.apache.solr.search.CollapseFilter.adjacentCollapse(CollapseFilter.java:161
)
 at org.apache.solr.search.CollapseFilter.lt;initgt;(CollapseFilter.java:141)
 
 at 
 org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:2
 17)
 at 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
 r.java:195)
 at 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
 va:131)
 
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1333)
 at 
 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303
)
 at 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:23
 2)
 
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
 lterChain.java:202)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
 n.java:173)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
 :213)
 
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
 :178)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:1
 07)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 
 at 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processCon
 nection(Http11BaseProtocol.java:664)
 at 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
 527)
 at 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWork
 erThread.java:80)
 
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:
 684)
 
 
 at java.lang.Thread.run(Thread.java:619)
 
 I think CollapseFilter is rather an important function in Solr that gets
 used quite frequently. Does anyone have a solution for this?
 
 -- 
 Regards,
 
 Cuong Hoang