[ 
https://issues.apache.org/jira/browse/LUCENE-2765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932291#action_12932291
 ] 

Robert Muir commented on LUCENE-2765:
-------------------------------------

i ran a quick very rough check, with AND query (3149 results for this query)... 
i didnt benchmark the omitTF case (but it should be better too)

all times in milliseconds

{code}
    QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "body", new 
MockAnalyzer());
    Query query = qp.parse("+the +america");
    System.out.println(searcher.search(query, 10).totalHits);
    long ms = System.currentTimeMillis();
    for (int i = 0; i < 1000; i++) {
      searcher.search(query, 10);
    }
    long ms2 = System.currentTimeMillis();
    System.out.println("time = " + (ms2 - ms));
{code}

||setup||run1||run2||run3||run4||run5||run6||
|trunk|1707|1706|1709|1704|1704|1703|
|LUCENE-2765|1628|1623|1641|1624|1627|1628|

seems worth it to me.


> Optimize scanning in DocsEnum
> -----------------------------
>
>                 Key: LUCENE-2765
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2765
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-2765.patch, LUCENE-2765.patch
>
>
> Similar to LUCENE-2761:
> when we call advance(), after skipping it scans, but this can be optimized 
> better than calling nextDoc() like today
> {noformat}
>       // scan for the rest:
>       do {
>         nextDoc();
>       } while (target > doc);
> {noformat}
> in particular, the freq can be "skipVinted" and the skipDocs (deletedDocs) 
> don't need to be checked during this scanning.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to