[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-25 Thread Hoss Man (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13911785#comment-13911785
 ] 

Hoss Man commented on SOLR-5624:


[~dboychuck]: please post your question to the solr-user list, or (if you have 
an improvement you'd like to contribe) open a new Jira issue to track it.

posting a comment in a resolve issue like this is almost certain to get lost 
and overlooked.

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 4.7, 5.0

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-24 Thread David (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13911191#comment-13911191
 ] 

David commented on SOLR-5624:
-

Hi Joel,

I sent you an email but I'm not sure if you received it or not. I ran into a 
bit of trouble using the CollapsingQParserPlugin with elevated documents. To 
explain it simply, I want to exclude grouped documents when one of the members 
of the group are contained in the elevated document set. I'm not sure this is 
possible currently because as you explain above elevated documents are added to 
the request context after the original query is constructed.

To try to better illustrate the problem. If I have 2 documents docid=1 and 
docid=2 and both have a groupid of 'a'. If a grouped query scores docid 2 first 
in the results but I have elevated docid 1 then both documents are shown in the 
results when I really only want the elevated document to be shown in the 
results.

Is this something that would be difficult to implement? Any help is appreciated.

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 4.7, 5.0

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-24 Thread David (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13911228#comment-13911228
 ] 

David commented on SOLR-5624:
-

I think the solution would be to remove the documents from liveDocs that share 
the same groupid in the getBoostDocs() function. Let me know if this makes any 
sense. I'll continue working towards a solution in the meantime.

{code}
private IntOpenHashSet getBoostDocs(SolrIndexSearcher indexSearcher, 
SetString boosted) throws IOException {
  IntOpenHashSet boostDocs = null;
  if(boosted != null) {
SchemaField idField = indexSearcher.getSchema().getUniqueKeyField();
String fieldName = idField.getName();
HashSetBytesRef localBoosts = new HashSet(boosted.size()*2);
IteratorString boostedIt = boosted.iterator();
while(boostedIt.hasNext()) {
  localBoosts.add(new BytesRef(boostedIt.next()));
}

boostDocs = new IntOpenHashSet(boosted.size()*2);

ListAtomicReaderContextleaves = 
indexSearcher.getTopReaderContext().leaves();
TermsEnum termsEnum = null;
DocsEnum docsEnum = null;
for(AtomicReaderContext leaf : leaves) {
  AtomicReader reader = leaf.reader();
  int docBase = leaf.docBase;
  Bits liveDocs = reader.getLiveDocs();
  Terms terms = reader.terms(fieldName);
  termsEnum = terms.iterator(termsEnum);
  IteratorBytesRef it = localBoosts.iterator();
  while(it.hasNext()) {
BytesRef ref = it.next();
if(termsEnum.seekExact(ref)) {
  docsEnum = termsEnum.docs(liveDocs, docsEnum);
  int doc = docsEnum.nextDoc();
  if(doc != -1) {
//Found the document.
boostDocs.add(doc+docBase);

   *// HERE REMOVE ANY DOCUMENTS THAT SHARE THE GROUPID NOT ONLY 
THE DOCID //*
it.remove();



  }
}
  }
}
  }

  return boostDocs;
}
{code}

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 4.7, 5.0

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-12 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13899169#comment-13899169
 ] 

ASF subversion and git services commented on SOLR-5624:
---

Commit 1567640 from [~joel.bernstein] in branch 'dev/trunk'
[ https://svn.apache.org/r1567640 ]

SOLR-5624: check for elevated documents in hashCode()

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 5.0, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-12 Thread Joel Bernstein (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13899183#comment-13899183
 ] 

Joel Bernstein commented on SOLR-5624:
--

The previous commit checks for elevated documents in the query's hashCode() 
method. This needs to be done because elevated documents do not appear in the 
request context until after the query is constructed. This is because the 
QueryElevationComponent adds the elevated documents to the request context 
after the original query is constructed.

When checking for the query in the QueryResultCache, we need to take into 
account the presence of elevated documents. The check that was added to the 
hashCode() method does this.

We still need to look for elevated docs in the getFilterCollector() method in 
case caching was turned off.

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 5.0, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-12 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13899190#comment-13899190
 ] 

ASF subversion and git services commented on SOLR-5624:
---

Commit 1567649 from [~joel.bernstein] in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1567649 ]

SOLR-5624: check for elevated documents in hashCode()

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 5.0, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13895921#comment-13895921
 ] 

ASF subversion and git services commented on SOLR-5624:
---

Commit 1566309 from [~joel.bernstein] in branch 'dev/trunk'
[ https://svn.apache.org/r1566309 ]

SOLR-5624: Guard against NPE during cache warming

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 5.0, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13895924#comment-13895924
 ] 

ASF subversion and git services commented on SOLR-5624:
---

Commit 1566312 from [~joel.bernstein] in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1566312 ]

SOLR-5624: Guard against NPE during cache warming

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 5.0, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-5624) Enable QueryResultCache for CollapsingQParserPlugin

2014-02-08 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13895726#comment-13895726
 ] 

ASF subversion and git services commented on SOLR-5624:
---

Commit 1566122 from [~joel.bernstein] in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1566122 ]

SOLR-5624: Enable QueryResultCache for CollapsingQParserPlugin

 Enable QueryResultCache for CollapsingQParserPlugin
 ---

 Key: SOLR-5624
 URL: https://issues.apache.org/jira/browse/SOLR-5624
 Project: Solr
  Issue Type: Task
Affects Versions: 4.6
Reporter: David
Assignee: Joel Bernstein
 Fix For: 4.5.1, 4.7

 Attachments: SOLR-5624.patch, SOLR-5624.patch, SOLR-5624.patch






--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org